	define("game.js", function (require, module, exports) {
		! function (t) {
			function e(n) {
				if (i[n]) return i[n].exports;
				var r = i[n] = {
					i: n,
					l: !1,
					exports: {}
				};
				return t[n].call(r.exports, r, r.exports, e), r.l = !0, r.exports
			}
			var i = {};
			e.m = t, e.c = i, e.i = function (t) {
				return t
			}, e.d = function (t, i, n) {
				e.o(t, i) || Object.defineProperty(t, i, {
					configurable: !1,
					enumerable: !0,
					get: n
				})
			}, e.n = function (t) {
				var i = t && t.__esModule ? function () {
					return t.default
				} : function () {
					return t
				};
				return e.d(i, "a", i), i
			}, e.o = function (t, e) {
				return Object.prototype.hasOwnProperty.call(t, e)
			}, e.p = "/", e(e.s = 39)
		}([function (t, e, i) {
			"use strict";
			var n, r, a, o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
				return typeof t
			} : function (t) {
				return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
			};
			! function (i, s) {
				"object" === o(e) && void 0 !== t ? s(e) : (r = [e], n = s, void 0 !== (a = "function" == typeof n ? n.apply(e, r) : n) && (t.exports = a))
			}(0, function (t) {
				function e() {}

				function i(t, e) {
					this.x = t || 0, this.y = e || 0
				}

				function n() {
					this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], arguments.length > 0 && console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")
				}

				function r(t, e, i, n) {
					this._x = t || 0, this._y = e || 0, this._z = i || 0, this._w = void 0 !== n ? n : 1
				}

				function a(t, e, i) {
					this.x = t || 0, this.y = e || 0, this.z = i || 0
				}

				function s() {
					this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1], arguments.length > 0 && console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")
				}

				function h(t, e, n, r, a, o, l, c, u, d) {
					Object.defineProperty(this, "id", {
						value: Za++
					}), this.uuid = Ya.generateUUID(), this.name = "", this.image = void 0 !== t ? t : h.DEFAULT_IMAGE, this.mipmaps = [], this.mapping = void 0 !== e ? e : h.DEFAULT_MAPPING, this.wrapS = void 0 !== n ? n : Qr, this.wrapT = void 0 !== r ? r : Qr, this.magFilter = void 0 !== a ? a : na, this.minFilter = void 0 !== o ? o : aa, this.anisotropy = void 0 !== u ? u : 1, this.format = void 0 !== l ? l : xa, this.type = void 0 !== c ? c : oa, this.offset = new i(0, 0), this.repeat = new i(1, 1), this.center = new i(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new s, this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.encoding = void 0 !== d ? d : Na, this.version = 0, this.onUpdate = null
				}

				function l(t, e, i, n) {
					this.x = t || 0, this.y = e || 0, this.z = i || 0, this.w = void 0 !== n ? n : 1
				}

				function c(t, e, i) {
					this.uuid = Ya.generateUUID(), this.width = t, this.height = e, this.scissor = new l(0, 0, t, e), this.scissorTest = !1, this.viewport = new l(0, 0, t, e), void 0 === (i = i || {}).minFilter && (i.minFilter = na), this.texture = new h(void 0, void 0, i.wrapS, i.wrapT, i.magFilter, i.minFilter, i.format, i.type, i.anisotropy, i.encoding), this.depthBuffer = void 0 === i.depthBuffer || i.depthBuffer, this.stencilBuffer = void 0 === i.stencilBuffer || i.stencilBuffer, this.depthTexture = void 0 !== i.depthTexture ? i.depthTexture : null
				}

				function u(t, e, i) {
					c.call(this, t, e, i), this.activeCubeFace = 0, this.activeMipMapLevel = 0
				}

				function d(t, e, i, n, r, a, o, s, l, c, u, d) {
					h.call(this, null, a, o, s, l, c, n, r, u, d), this.image = {
						data: t,
						width: e,
						height: i
					}, this.magFilter = void 0 !== l ? l : ta, this.minFilter = void 0 !== c ? c : ta, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1
				}

				function f(t, e, i, n, r, a, o, s, l, c) {
					h.call(this, t = void 0 !== t ? t : [], e = void 0 !== e ? e : Vr, i, n, r, a, o, s, l, c), this.flipY = !1
				}

				function p() {
					this.seq = [], this.map = {}
				}

				function m(t, e, i) {
					var n = t[0];
					if (n <= 0 || n > 0) return t;
					var r = e * i,
						a = $a[r];
					if (void 0 === a && (a = new Float32Array(r), $a[r] = a), 0 !== e) {
						n.toArray(a, 0);
						for (var o = 1, s = 0; o !== e; ++o) s += i, t[o].toArray(a, s)
					}
					return a
				}

				function g(t, e) {
					var i = to[e];
					void 0 === i && (i = new Int32Array(e), to[e] = i);
					for (var n = 0; n !== e; ++n) i[n] = t.allocTextureUnit();
					return i
				}

				function v(t, e) {
					t.uniform1f(this.addr, e)
				}

				function y(t, e) {
					t.uniform1i(this.addr, e)
				}

				function b(t, e) {
					void 0 === e.x ? t.uniform2fv(this.addr, e) : t.uniform2f(this.addr, e.x, e.y)
				}

				function x(t, e) {
					void 0 !== e.x ? t.uniform3f(this.addr, e.x, e.y, e.z) : void 0 !== e.r ? t.uniform3f(this.addr, e.r, e.g, e.b) : t.uniform3fv(this.addr, e)
				}

				function _(t, e) {
					void 0 === e.x ? t.uniform4fv(this.addr, e) : t.uniform4f(this.addr, e.x, e.y, e.z, e.w)
				}

				function w(t, e) {
					t.uniformMatrix2fv(this.addr, !1, e.elements || e)
				}

				function M(t, e) {
					void 0 === e.elements ? t.uniformMatrix3fv(this.addr, !1, e) : (io.set(e.elements), t.uniformMatrix3fv(this.addr, !1, io))
				}

				function T(t, e) {
					void 0 === e.elements ? t.uniformMatrix4fv(this.addr, !1, e) : (eo.set(e.elements), t.uniformMatrix4fv(this.addr, !1, eo))
				}

				function S(t, e, i) {
					var n = i.allocTextureUnit();
					t.uniform1i(this.addr, n), i.setTexture2D(e || Ja, n)
				}

				function E(t, e, i) {
					var n = i.allocTextureUnit();
					t.uniform1i(this.addr, n), i.setTextureCube(e || Qa, n)
				}

				function C(t, e) {
					t.uniform2iv(this.addr, e)
				}

				function P(t, e) {
					t.uniform3iv(this.addr, e)
				}

				function k(t, e) {
					t.uniform4iv(this.addr, e)
				}

				function A(t, e) {
					t.uniform1fv(this.addr, e)
				}

				function L(t, e) {
					t.uniform1iv(this.addr, e)
				}

				function R(t, e) {
					t.uniform2fv(this.addr, m(e, this.size, 2))
				}

				function O(t, e) {
					t.uniform3fv(this.addr, m(e, this.size, 3))
				}

				function I(t, e) {
					t.uniform4fv(this.addr, m(e, this.size, 4))
				}

				function B(t, e) {
					t.uniformMatrix2fv(this.addr, !1, m(e, this.size, 4))
				}

				function U(t, e) {
					t.uniformMatrix3fv(this.addr, !1, m(e, this.size, 9))
				}

				function D(t, e) {
					t.uniformMatrix4fv(this.addr, !1, m(e, this.size, 16))
				}

				function z(t, e, i) {
					var n = e.length,
						r = g(i, n);
					t.uniform1iv(this.addr, r);
					for (var a = 0; a !== n; ++a) i.setTexture2D(e[a] || Ja, r[a])
				}

				function j(t, e, i) {
					var n = e.length,
						r = g(i, n);
					t.uniform1iv(this.addr, r);
					for (var a = 0; a !== n; ++a) i.setTextureCube(e[a] || Qa, r[a])
				}

				function N(t, e, i) {
					this.id = t, this.addr = i, this.setValue = function (t) {
						switch (t) {
							case 5126:
								return v;
							case 35664:
								return b;
							case 35665:
								return x;
							case 35666:
								return _;
							case 35674:
								return w;
							case 35675:
								return M;
							case 35676:
								return T;
							case 35678:
							case 36198:
								return S;
							case 35680:
								return E;
							case 5124:
							case 35670:
								return y;
							case 35667:
							case 35671:
								return C;
							case 35668:
							case 35672:
								return P;
							case 35669:
							case 35673:
								return k
						}
					}(e.type)
				}

				function F(t, e, i) {
					this.id = t, this.addr = i, this.size = e.size, this.setValue = function (t) {
						switch (t) {
							case 5126:
								return A;
							case 35664:
								return R;
							case 35665:
								return O;
							case 35666:
								return I;
							case 35674:
								return B;
							case 35675:
								return U;
							case 35676:
								return D;
							case 35678:
								return z;
							case 35680:
								return j;
							case 5124:
							case 35670:
								return L;
							case 35667:
							case 35671:
								return C;
							case 35668:
							case 35672:
								return P;
							case 35669:
							case 35673:
								return k
						}
					}(e.type)
				}

				function G(t) {
					this.id = t, p.call(this)
				}

				function H(t, e) {
					t.seq.push(e), t.map[e.id] = e
				}

				function V(t, e, i) {
					var n = t.name,
						r = n.length;
					for (no.lastIndex = 0;;) {
						var a = no.exec(n),
							o = no.lastIndex,
							s = a[1],
							h = "]" === a[2],
							l = a[3];
						if (h && (s |= 0), void 0 === l || "[" === l && o + 2 === r) {
							H(i, void 0 === l ? new N(s, t, e) : new F(s, t, e));
							break
						}
						var c = i.map[s];
						void 0 === c && H(i, c = new G(s)), i = c
					}
				}

				function W(t, e, i) {
					p.call(this), this.renderer = i;
					for (var n = t.getProgramParameter(e, t.ACTIVE_UNIFORMS), r = 0; r < n; ++r) {
						var a = t.getActiveUniform(e, r),
							o = a.name;
						V(a, t.getUniformLocation(e, o), this)
					}
				}

				function q(t, e, i) {
					return void 0 === e && void 0 === i ? this.set(t) : this.setRGB(t, e, i)
				}

				function X(t, e) {
					this.min = void 0 !== t ? t : new i(1 / 0, 1 / 0), this.max = void 0 !== e ? e : new i(-1 / 0, -1 / 0)
				}

				function K(t, e, n, r, o) {
					function s() {
						var t = new Float32Array([-1, -1, 0, 0, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 0, 1]),
							i = new Uint16Array([0, 1, 2, 0, 2, 3]);
						h = e.createBuffer(), l = e.createBuffer(), e.bindBuffer(e.ARRAY_BUFFER, h), e.bufferData(e.ARRAY_BUFFER, t, e.STATIC_DRAW), e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, l), e.bufferData(e.ELEMENT_ARRAY_BUFFER, i, e.STATIC_DRAW), p = e.createTexture(), m = e.createTexture(), n.bindTexture(e.TEXTURE_2D, p), e.texImage2D(e.TEXTURE_2D, 0, e.RGB, 16, 16, 0, e.RGB, e.UNSIGNED_BYTE, null), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.NEAREST), n.bindTexture(e.TEXTURE_2D, m), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, 16, 16, 0, e.RGBA, e.UNSIGNED_BYTE, null), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.NEAREST), c = {
							vertexShader: ["uniform lowp int renderType;", "uniform vec3 screenPosition;", "uniform vec2 scale;", "uniform float rotation;", "uniform sampler2D occlusionMap;", "attribute vec2 position;", "attribute vec2 uv;", "varying vec2 vUV;", "varying float vVisibility;", "void main() {", "\tvUV = uv;", "\tvec2 pos = position;", "\tif ( renderType == 2 ) {", "\t\tvec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );", "\t\tvisibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );", "\t\tvisibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );", "\t\tvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );", "\t\tvisibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );", "\t\tvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );", "\t\tvisibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );", "\t\tvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );", "\t\tvisibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );", "\t\tvVisibility =        visibility.r / 9.0;", "\t\tvVisibility *= 1.0 - visibility.g / 9.0;", "\t\tvVisibility *=       visibility.b / 9.0;", "\t\tvVisibility *= 1.0 - visibility.a / 9.0;", "\t\tpos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;", "\t\tpos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;", "\t}", "\tgl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );", "}"].join("\n"),
							fragmentShader: ["uniform lowp int renderType;", "uniform sampler2D map;", "uniform float opacity;", "uniform vec3 color;", "varying vec2 vUV;", "varying float vVisibility;", "void main() {", "\tif ( renderType == 0 ) {", "\t\tgl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );", "\t} else if ( renderType == 1 ) {", "\t\tgl_FragColor = texture2D( map, vUV );", "\t} else {", "\t\tvec4 texture = texture2D( map, vUV );", "\t\ttexture.a *= opacity * vVisibility;", "\t\tgl_FragColor = texture;", "\t\tgl_FragColor.rgb *= color;", "\t}", "}"].join("\n")
						}, u = function (t) {
							var i = e.createProgram(),
								n = e.createShader(e.FRAGMENT_SHADER),
								r = e.createShader(e.VERTEX_SHADER),
								a = "precision " + o.precision + " float;\n";
							return e.shaderSource(n, a + t.fragmentShader), e.shaderSource(r, a + t.vertexShader), e.compileShader(n), e.compileShader(r), e.attachShader(i, n), e.attachShader(i, r), e.linkProgram(i), i
						}(c), d = {
							vertex: e.getAttribLocation(u, "position"),
							uv: e.getAttribLocation(u, "uv")
						}, f = {
							renderType: e.getUniformLocation(u, "renderType"),
							map: e.getUniformLocation(u, "map"),
							occlusionMap: e.getUniformLocation(u, "occlusionMap"),
							opacity: e.getUniformLocation(u, "opacity"),
							color: e.getUniformLocation(u, "color"),
							scale: e.getUniformLocation(u, "scale"),
							rotation: e.getUniformLocation(u, "rotation"),
							screenPosition: e.getUniformLocation(u, "screenPosition")
						}
					}
					var h, l, c, u, d, f, p, m;
					this.render = function (t, o, c, g) {
						if (0 !== t.length) {
							var v = new a,
								y = g.w / g.z,
								b = .5 * g.z,
								x = .5 * g.w,
								_ = 16 / g.w,
								w = new i(_ * y, _),
								M = new a(1, 1, 0),
								T = new i(1, 1),
								S = new X;
							S.min.set(g.x, g.y), S.max.set(g.x + (g.z - 16), g.y + (g.w - 16)), void 0 === u && s(), n.useProgram(u), n.initAttributes(), n.enableAttribute(d.vertex), n.enableAttribute(d.uv), n.disableUnusedAttributes(), e.uniform1i(f.occlusionMap, 0), e.uniform1i(f.map, 1), e.bindBuffer(e.ARRAY_BUFFER, h), e.vertexAttribPointer(d.vertex, 2, e.FLOAT, !1, 16, 0), e.vertexAttribPointer(d.uv, 2, e.FLOAT, !1, 16, 8), e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, l), n.disable(e.CULL_FACE), n.buffers.depth.setMask(!1);
							for (var E = 0, C = t.length; E < C; E++) {
								_ = 16 / g.w, w.set(_ * y, _);
								var P = t[E];
								if (v.set(P.matrixWorld.elements[12], P.matrixWorld.elements[13], P.matrixWorld.elements[14]), v.applyMatrix4(c.matrixWorldInverse), v.applyMatrix4(c.projectionMatrix), M.copy(v), T.x = g.x + M.x * b + b - 8, T.y = g.y + M.y * x + x - 8, !0 === S.containsPoint(T)) {
									n.activeTexture(e.TEXTURE0), n.bindTexture(e.TEXTURE_2D, null), n.activeTexture(e.TEXTURE1), n.bindTexture(e.TEXTURE_2D, p), e.copyTexImage2D(e.TEXTURE_2D, 0, e.RGB, T.x, T.y, 16, 16, 0), e.uniform1i(f.renderType, 0), e.uniform2f(f.scale, w.x, w.y), e.uniform3f(f.screenPosition, M.x, M.y, M.z), n.disable(e.BLEND), n.enable(e.DEPTH_TEST), e.drawElements(e.TRIANGLES, 6, e.UNSIGNED_SHORT, 0), n.activeTexture(e.TEXTURE0), n.bindTexture(e.TEXTURE_2D, m), e.copyTexImage2D(e.TEXTURE_2D, 0, e.RGBA, T.x, T.y, 16, 16, 0), e.uniform1i(f.renderType, 1), n.disable(e.DEPTH_TEST), n.activeTexture(e.TEXTURE1), n.bindTexture(e.TEXTURE_2D, p), e.drawElements(e.TRIANGLES, 6, e.UNSIGNED_SHORT, 0), P.positionScreen.copy(M), P.customUpdateCallback ? P.customUpdateCallback(P) : P.updateLensFlares(), e.uniform1i(f.renderType, 2), n.enable(e.BLEND);
									for (var k = 0, A = P.lensFlares.length; k < A; k++) {
										var L = P.lensFlares[k];
										L.opacity > .001 && L.scale > .001 && (M.x = L.x, M.y = L.y, M.z = L.z, _ = L.size * L.scale / g.w, w.x = _ * y, w.y = _, e.uniform3f(f.screenPosition, M.x, M.y, M.z), e.uniform2f(f.scale, w.x, w.y), e.uniform1f(f.rotation, L.rotation), e.uniform1f(f.opacity, L.opacity), e.uniform3f(f.color, L.color.r, L.color.g, L.color.b), n.setBlending(L.blending, L.blendEquation, L.blendSrc, L.blendDst), r.setTexture2D(L.texture, 1), e.drawElements(e.TRIANGLES, 6, e.UNSIGNED_SHORT, 0))
									}
								}
							}
							n.enable(e.CULL_FACE), n.enable(e.DEPTH_TEST), n.buffers.depth.setMask(!0), n.reset()
						}
					}
				}

				function Y(t, e, i, n, r, a, o, s, l) {
					h.call(this, t, e, i, n, r, a, o, s, l), this.needsUpdate = !0
				}

				function Z(t, e, i, n, o) {
					function s() {
						var t = new Float32Array([-.5, -.5, 0, 0, .5, -.5, 1, 0, .5, .5, 1, 1, -.5, .5, 0, 1]),
							i = new Uint16Array([0, 1, 2, 0, 2, 3]);
						l = e.createBuffer(), c = e.createBuffer(), e.bindBuffer(e.ARRAY_BUFFER, l), e.bufferData(e.ARRAY_BUFFER, t, e.STATIC_DRAW), e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, c), e.bufferData(e.ELEMENT_ARRAY_BUFFER, i, e.STATIC_DRAW), u = function () {
							var t = e.createProgram(),
								i = e.createShader(e.VERTEX_SHADER),
								n = e.createShader(e.FRAGMENT_SHADER);
							return e.shaderSource(i, ["precision " + o.precision + " float;", "#define SHADER_NAME SpriteMaterial", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform float rotation;", "uniform vec2 scale;", "uniform vec2 uvOffset;", "uniform vec2 uvScale;", "attribute vec2 position;", "attribute vec2 uv;", "varying vec2 vUV;", "varying float fogDepth;", "void main() {", "\tvUV = uvOffset + uv * uvScale;", "\tvec2 alignedPosition = position * scale;", "\tvec2 rotatedPosition;", "\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;", "\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;", "\tvec4 mvPosition;", "\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );", "\tmvPosition.xy += rotatedPosition;", "\tgl_Position = projectionMatrix * mvPosition;", "\tfogDepth = - mvPosition.z;", "}"].join("\n")), e.shaderSource(n, ["precision " + o.precision + " float;", "#define SHADER_NAME SpriteMaterial", "uniform vec3 color;", "uniform sampler2D map;", "uniform float opacity;", "uniform int fogType;", "uniform vec3 fogColor;", "uniform float fogDensity;", "uniform float fogNear;", "uniform float fogFar;", "uniform float alphaTest;", "varying vec2 vUV;", "varying float fogDepth;", "void main() {", "\tvec4 texture = texture2D( map, vUV );", "\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );", "\tif ( gl_FragColor.a < alphaTest ) discard;", "\tif ( fogType > 0 ) {", "\t\tfloat fogFactor = 0.0;", "\t\tif ( fogType == 1 ) {", "\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );", "\t\t} else {", "\t\t\tconst float LOG2 = 1.442695;", "\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );", "\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );", "\t\t}", "\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );", "\t}", "}"].join("\n")), e.compileShader(i), e.compileShader(n), e.attachShader(t, i), e.attachShader(t, n), e.linkProgram(t), t
						}(), d = {
							position: e.getAttribLocation(u, "position"),
							uv: e.getAttribLocation(u, "uv")
						}, f = {
							uvOffset: e.getUniformLocation(u, "uvOffset"),
							uvScale: e.getUniformLocation(u, "uvScale"),
							rotation: e.getUniformLocation(u, "rotation"),
							scale: e.getUniformLocation(u, "scale"),
							color: e.getUniformLocation(u, "color"),
							map: e.getUniformLocation(u, "map"),
							opacity: e.getUniformLocation(u, "opacity"),
							modelViewMatrix: e.getUniformLocation(u, "modelViewMatrix"),
							projectionMatrix: e.getUniformLocation(u, "projectionMatrix"),
							fogType: e.getUniformLocation(u, "fogType"),
							fogDensity: e.getUniformLocation(u, "fogDensity"),
							fogNear: e.getUniformLocation(u, "fogNear"),
							fogFar: e.getUniformLocation(u, "fogFar"),
							fogColor: e.getUniformLocation(u, "fogColor"),
							fogDepth: e.getUniformLocation(u, "fogDepth"),
							alphaTest: e.getUniformLocation(u, "alphaTest")
						};
						var n = document.createElement("canvas");
						n.width = 8, n.height = 8;
						var r = n.getContext("2d");
						r.fillStyle = "white", r.fillRect(0, 0, 8, 8), p = new Y(n)
					}

					function h(t, e) {
						return t.renderOrder !== e.renderOrder ? t.renderOrder - e.renderOrder : t.z !== e.z ? e.z - t.z : e.id - t.id
					}
					var l, c, u, d, f, p, m = new a,
						g = new r,
						v = new a;
					this.render = function (r, a, o) {
						if (0 !== r.length) {
							void 0 === u && s(), i.useProgram(u), i.initAttributes(), i.enableAttribute(d.position), i.enableAttribute(d.uv), i.disableUnusedAttributes(), i.disable(e.CULL_FACE), i.enable(e.BLEND), e.bindBuffer(e.ARRAY_BUFFER, l), e.vertexAttribPointer(d.position, 2, e.FLOAT, !1, 16, 0), e.vertexAttribPointer(d.uv, 2, e.FLOAT, !1, 16, 8), e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, c), e.uniformMatrix4fv(f.projectionMatrix, !1, o.projectionMatrix.elements), i.activeTexture(e.TEXTURE0), e.uniform1i(f.map, 0);
							var y = 0,
								b = 0,
								x = a.fog;
							x ? (e.uniform3f(f.fogColor, x.color.r, x.color.g, x.color.b), x.isFog ? (e.uniform1f(f.fogNear, x.near), e.uniform1f(f.fogFar, x.far), e.uniform1i(f.fogType, 1), y = 1, b = 1) : x.isFogExp2 && (e.uniform1f(f.fogDensity, x.density), e.uniform1i(f.fogType, 2), y = 2, b = 2)) : (e.uniform1i(f.fogType, 0), y = 0, b = 0);
							for (var _ = 0, w = r.length; _ < w; _++) {
								(T = r[_]).modelViewMatrix.multiplyMatrices(o.matrixWorldInverse, T.matrixWorld), T.z = -T.modelViewMatrix.elements[14]
							}
							r.sort(h);
							for (var M = [], _ = 0, w = r.length; _ < w; _++) {
								var T = r[_],
									S = T.material;
								if (!1 !== S.visible) {
									T.onBeforeRender(t, a, o, void 0, S, void 0), e.uniform1f(f.alphaTest, S.alphaTest), e.uniformMatrix4fv(f.modelViewMatrix, !1, T.modelViewMatrix.elements), T.matrixWorld.decompose(m, g, v), M[0] = v.x, M[1] = v.y;
									var E = 0;
									a.fog && S.fog && (E = b), y !== E && (e.uniform1i(f.fogType, E), y = E), null !== S.map ? (e.uniform2f(f.uvOffset, S.map.offset.x, S.map.offset.y), e.uniform2f(f.uvScale, S.map.repeat.x, S.map.repeat.y)) : (e.uniform2f(f.uvOffset, 0, 0), e.uniform2f(f.uvScale, 1, 1)), e.uniform1f(f.opacity, S.opacity), e.uniform3f(f.color, S.color.r, S.color.g, S.color.b), e.uniform1f(f.rotation, S.rotation), e.uniform2fv(f.scale, M), i.setBlending(S.blending, S.blendEquation, S.blendSrc, S.blendDst, S.blendEquationAlpha, S.blendSrcAlpha, S.blendDstAlpha, S.premultipliedAlpha), i.buffers.depth.setTest(S.depthTest), i.buffers.depth.setMask(S.depthWrite), i.buffers.color.setMask(S.colorWrite), n.setTexture2D(S.map || p, 0), e.drawElements(e.TRIANGLES, 6, e.UNSIGNED_SHORT, 0), T.onAfterRender(t, a, o, void 0, S, void 0)
								}
							}
							i.enable(e.CULL_FACE), i.reset()
						}
					}
				}

				function J() {
					Object.defineProperty(this, "id", {
						value: lo++
					}), this.uuid = Ya.generateUUID(), this.name = "", this.type = "Material", this.fog = !0, this.lights = !0, this.blending = sr, this.side = tr, this.flatShading = !1, this.vertexColors = nr, this.opacity = 1, this.transparent = !1, this.blendSrc = _r, this.blendDst = wr, this.blendEquation = dr, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.depthFunc = Lr, this.depthTest = !0, this.depthWrite = !0, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaTest = 0, this.premultipliedAlpha = !1, this.overdraw = 0, this.visible = !0, this.userData = {}, this.needsUpdate = !0
				}

				function Q(t) {
					J.call(this), this.type = "MeshDepthMaterial", this.depthPacking = Xa, this.skinning = !1, this.morphTargets = !1, this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.lights = !1, this.setValues(t)
				}

				function $(t) {
					J.call(this), this.type = "MeshDistanceMaterial", this.referencePosition = new a, this.nearDistance = 1, this.farDistance = 1e3, this.skinning = !1, this.morphTargets = !1, this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.fog = !1, this.lights = !1, this.setValues(t)
				}

				function tt(t, e) {
					this.min = void 0 !== t ? t : new a(1 / 0, 1 / 0, 1 / 0), this.max = void 0 !== e ? e : new a(-1 / 0, -1 / 0, -1 / 0)
				}

				function et(t, e) {
					this.center = void 0 !== t ? t : new a, this.radius = void 0 !== e ? e : 0
				}

				function it(t, e) {
					this.normal = void 0 !== t ? t : new a(1, 0, 0), this.constant = void 0 !== e ? e : 0
				}

				function nt(t, e, i, n, r, a) {
					this.planes = [void 0 !== t ? t : new it, void 0 !== e ? e : new it, void 0 !== i ? i : new it, void 0 !== n ? n : new it, void 0 !== r ? r : new it, void 0 !== a ? a : new it]
				}

				function rt(t, e, r) {
					function o(e, i, n, r, a, o) {
						var s = e.geometry,
							h = null,
							l = b,
							c = e.customDepthMaterial;
						if (n && (l = x, c = e.customDistanceMaterial), c) h = c;
						else {
							var u = !1;
							i.morphTargets && (s && s.isBufferGeometry ? u = s.morphAttributes && s.morphAttributes.position && s.morphAttributes.position.length > 0 : s && s.isGeometry && (u = s.morphTargets && s.morphTargets.length > 0)), e.isSkinnedMesh && !1 === i.skinning && console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:", e);
							var d = e.isSkinnedMesh && i.skinning,
								f = 0;
							u && (f |= g), d && (f |= v), h = l[f]
						}
						if (t.localClippingEnabled && !0 === i.clipShadows && 0 !== i.clippingPlanes.length) {
							var p = h.uuid,
								m = i.uuid,
								y = _[p];
							void 0 === y && (y = {}, _[p] = y);
							var w = y[m];
							void 0 === w && (w = h.clone(), y[m] = w), h = w
						}
						h.visible = i.visible, h.wireframe = i.wireframe;
						var M = i.side;
						return A.renderSingleSided && M == ir && (M = tr), A.renderReverseSided && (M === tr ? M = er : M === er && (M = tr)), h.side = M, h.clipShadows = i.clipShadows, h.clippingPlanes = i.clippingPlanes, h.clipIntersection = i.clipIntersection, h.wireframeLinewidth = i.wireframeLinewidth, h.linewidth = i.linewidth, n && h.isMeshDistanceMaterial && (h.referencePosition.copy(r), h.nearDistance = a, h.farDistance = o), h
					}

					function s(i, n, r, a) {
						if (!1 !== i.visible) {
							if (i.layers.test(n.layers) && (i.isMesh || i.isLine || i.isPoints) && i.castShadow && (!i.frustumCulled || h.intersectsObject(i))) {
								i.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse, i.matrixWorld);
								var l = e.update(i),
									c = i.material;
								if (Array.isArray(c))
									for (var u = l.groups, d = 0, f = u.length; d < f; d++) {
										var p = u[d],
											g = c[p.materialIndex];
										if (g && g.visible) {
											v = o(i, g, a, m, r.near, r.far);
											t.renderBufferDirect(r, null, l, v, i, p)
										}
									} else if (c.visible) {
										var v = o(i, c, a, m, r.near, r.far);
										t.renderBufferDirect(r, null, l, v, i, null)
									}
							}
							for (var y = i.children, b = 0, x = y.length; b < x; b++) s(y[b], n, r, a)
						}
					}
					for (var h = new nt, u = new n, d = new i, f = new i(r, r), p = new a, m = new a, g = 1, v = 2, y = 1 + (g | v), b = new Array(y), x = new Array(y), _ = {}, w = [new a(1, 0, 0), new a(-1, 0, 0), new a(0, 0, 1), new a(0, 0, -1), new a(0, 1, 0), new a(0, -1, 0)], M = [new a(0, 1, 0), new a(0, 1, 0), new a(0, 1, 0), new a(0, 1, 0), new a(0, 0, 1), new a(0, 0, -1)], T = [new l, new l, new l, new l, new l, new l], S = 0; S !== y; ++S) {
						var E = 0 != (S & g),
							C = 0 != (S & v),
							P = new Q({
								depthPacking: Ka,
								morphTargets: E,
								skinning: C
							});
						b[S] = P;
						var k = new $({
							morphTargets: E,
							skinning: C
						});
						x[S] = k
					}
					var A = this;
					this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = Qn, this.renderReverseSided = !0, this.renderSingleSided = !0, this.render = function (e, i, n) {
						if (!1 !== A.enabled && (!1 !== A.autoUpdate || !1 !== A.needsUpdate) && 0 !== e.length) {
							var r = t.context,
								a = t.state;
							a.disable(r.BLEND), a.buffers.color.setClear(1, 1, 1, 1), a.buffers.depth.setTest(!0), a.setScissorTest(!1);
							for (var o, l = 0, g = e.length; l < g; l++) {
								var v = e[l],
									y = v.shadow,
									b = v && v.isPointLight;
								if (void 0 !== y) {
									var x = y.camera;
									if (d.copy(y.mapSize), d.min(f), b) {
										var _ = d.x,
											S = d.y;
										T[0].set(2 * _, S, _, S), T[1].set(0, S, _, S), T[2].set(3 * _, S, _, S), T[3].set(_, S, _, S), T[4].set(3 * _, 0, _, S), T[5].set(_, 0, _, S), d.x *= 4, d.y *= 2
									}
									if (null === y.map) {
										var E = {
											minFilter: ta,
											magFilter: ta,
											format: xa
										};
										y.map = new c(d.x, d.y, E), y.map.texture.name = v.name + ".shadowMap", x.updateProjectionMatrix()
									}
									y.isSpotLightShadow && y.update(v);
									var C = y.map,
										P = y.matrix;
									m.setFromMatrixPosition(v.matrixWorld), x.position.copy(m), b ? (o = 6, P.makeTranslation(-m.x, -m.y, -m.z)) : (o = 1, p.setFromMatrixPosition(v.target.matrixWorld), x.lookAt(p), x.updateMatrixWorld(), P.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, .5, .5, 0, 0, 0, 1), P.multiply(x.projectionMatrix), P.multiply(x.matrixWorldInverse)), t.setRenderTarget(C), t.clear();
									for (var k = 0; k < o; k++) {
										if (b) {
											p.copy(x.position), p.add(w[k]), x.up.copy(M[k]), x.lookAt(p), x.updateMatrixWorld();
											var L = T[k];
											a.viewport(L)
										}
										u.multiplyMatrices(x.projectionMatrix, x.matrixWorldInverse), h.setFromMatrix(u), s(i, n, x, b)
									}
								} else console.warn("THREE.WebGLShadowMap:", v, "has no shadow.")
							}
							A.needsUpdate = !1
						}
					}
				}

				function at(t) {
					function e(e, n) {
						e.isInterleavedBufferAttribute && (e = e.data);
						var r = i[e.uuid];
						void 0 === r ? i[e.uuid] = function (e, i) {
							var n = e.array,
								r = e.dynamic ? t.DYNAMIC_DRAW : t.STATIC_DRAW,
								a = t.createBuffer();
							t.bindBuffer(i, a), t.bufferData(i, n, r), e.onUploadCallback();
							var o = t.FLOAT;
							return n instanceof Float32Array ? o = t.FLOAT : n instanceof Float64Array ? console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.") : n instanceof Uint16Array ? o = t.UNSIGNED_SHORT : n instanceof Int16Array ? o = t.SHORT : n instanceof Uint32Array ? o = t.UNSIGNED_INT : n instanceof Int32Array ? o = t.INT : n instanceof Int8Array ? o = t.BYTE : n instanceof Uint8Array && (o = t.UNSIGNED_BYTE), {
								buffer: a,
								type: o,
								bytesPerElement: n.BYTES_PER_ELEMENT,
								version: e.version
							}
						}(e, n) : r.version < e.version && (! function (e, i, n) {
							var r = i.array,
								a = i.updateRange;
							t.bindBuffer(n, e), !1 === i.dynamic ? t.bufferData(n, r, t.STATIC_DRAW) : -1 === a.count ? t.bufferSubData(n, 0, r) : 0 === a.count ? console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually.") : (t.bufferSubData(n, a.offset * r.BYTES_PER_ELEMENT, r.subarray(a.offset, a.offset + a.count)), a.count = -1)
						}(r.buffer, e, n), r.version = e.version)
					}
					var i = {};
					return {
						get: function (t) {
							return t.isInterleavedBufferAttribute && (t = t.data), i[t.uuid]
						},
						remove: function (e) {
							e.isInterleavedBufferAttribute && (e = e.data);
							var n = i[e.uuid];
							n && (t.deleteBuffer(n.buffer), delete i[e.uuid])
						},
						update: e
					}
				}

				function ot(t, e, i, n) {
					this._x = t || 0, this._y = e || 0, this._z = i || 0, this._order = n || ot.DefaultOrder
				}

				function st() {
					this.mask = 1
				}

				function ht() {
					Object.defineProperty(this, "id", {
						value: co++
					}), this.uuid = Ya.generateUUID(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = ht.DefaultUp.clone();
					var t = new a,
						e = new ot,
						i = new r,
						o = new a(1, 1, 1);
					e.onChange(function () {
						i.setFromEuler(e, !1)
					}), i.onChange(function () {
						e.setFromQuaternion(i, void 0, !1)
					}), Object.defineProperties(this, {
						position: {
							enumerable: !0,
							value: t
						},
						rotation: {
							enumerable: !0,
							value: e
						},
						quaternion: {
							enumerable: !0,
							value: i
						},
						scale: {
							enumerable: !0,
							value: o
						},
						modelViewMatrix: {
							value: new n
						},
						normalMatrix: {
							value: new s
						}
					}), this.matrix = new n, this.matrixWorld = new n, this.matrixAutoUpdate = ht.DefaultMatrixAutoUpdate, this.matrixWorldNeedsUpdate = !1, this.layers = new st, this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.userData = {}
				}

				function lt() {
					ht.call(this), this.type = "Camera", this.matrixWorldInverse = new n, this.projectionMatrix = new n
				}

				function ct(t, e, i, n, r, a) {
					lt.call(this), this.type = "OrthographicCamera", this.zoom = 1, this.view = null, this.left = t, this.right = e, this.top = i, this.bottom = n, this.near = void 0 !== r ? r : .1, this.far = void 0 !== a ? a : 2e3, this.updateProjectionMatrix()
				}

				function ut(t, e, i, n, r, o) {
					this.a = t, this.b = e, this.c = i, this.normal = n && n.isVector3 ? n : new a, this.vertexNormals = Array.isArray(n) ? n : [], this.color = r && r.isColor ? r : new q, this.vertexColors = Array.isArray(r) ? r : [], this.materialIndex = void 0 !== o ? o : 0
				}

				function dt() {
					Object.defineProperty(this, "id", {
						value: uo += 2
					}), this.uuid = Ya.generateUUID(), this.name = "", this.type = "Geometry", this.vertices = [], this.colors = [], this.faces = [], this.faceVertexUvs = [
						[]
					], this.morphTargets = [], this.morphNormals = [], this.skinWeights = [], this.skinIndices = [], this.lineDistances = [], this.boundingBox = null, this.boundingSphere = null, this.elementsNeedUpdate = !1, this.verticesNeedUpdate = !1, this.uvsNeedUpdate = !1, this.normalsNeedUpdate = !1, this.colorsNeedUpdate = !1, this.lineDistancesNeedUpdate = !1, this.groupsNeedUpdate = !1
				}

				function ft(t, e, i) {
					if (Array.isArray(t)) throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
					this.uuid = Ya.generateUUID(), this.name = "", this.array = t, this.itemSize = e, this.count = void 0 !== t ? t.length / e : 0, this.normalized = !0 === i, this.dynamic = !1, this.updateRange = {
						offset: 0,
						count: -1
					}, this.onUploadCallback = function () {}, this.version = 0
				}

				function pt(t, e, i) {
					ft.call(this, new Int8Array(t), e, i)
				}

				function mt(t, e, i) {
					ft.call(this, new Uint8Array(t), e, i)
				}

				function gt(t, e, i) {
					ft.call(this, new Uint8ClampedArray(t), e, i)
				}

				function vt(t, e, i) {
					ft.call(this, new Int16Array(t), e, i)
				}

				function yt(t, e, i) {
					ft.call(this, new Uint16Array(t), e, i)
				}

				function bt(t, e, i) {
					ft.call(this, new Int32Array(t), e, i)
				}

				function xt(t, e, i) {
					ft.call(this, new Uint32Array(t), e, i)
				}

				function _t(t, e, i) {
					ft.call(this, new Float32Array(t), e, i)
				}

				function wt(t, e, i) {
					ft.call(this, new Float64Array(t), e, i)
				}

				function Mt() {
					this.indices = [], this.vertices = [], this.normals = [], this.colors = [], this.uvs = [], this.uvs2 = [], this.groups = [], this.morphTargets = {}, this.skinWeights = [], this.skinIndices = [], this.boundingBox = null, this.boundingSphere = null, this.verticesNeedUpdate = !1, this.normalsNeedUpdate = !1, this.colorsNeedUpdate = !1, this.uvsNeedUpdate = !1, this.groupsNeedUpdate = !1
				}

				function Tt(t) {
					if (0 === t.length) return -1 / 0;
					for (var e = t[0], i = 1, n = t.length; i < n; ++i) t[i] > e && (e = t[i]);
					return e
				}

				function St() {
					Object.defineProperty(this, "id", {
						value: fo += 2
					}), this.uuid = Ya.generateUUID(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = {
						start: 0,
						count: 1 / 0
					}
				}

				function Et(t, e) {
					dt.call(this), this.type = "ShapeGeometry", "object" === (void 0 === e ? "undefined" : o(e)) && (console.warn("THREE.ShapeGeometry: Options parameter has been removed."), e = e.curveSegments), this.parameters = {
						shapes: t,
						curveSegments: e
					}, this.fromBufferGeometry(new Ct(t, e)), this.mergeVertices()
				}

				function Ct(t, e) {
					function i(t) {
						var i, s, l, c = r.length / 3,
							u = t.extractPoints(e),
							d = u.shape,
							f = u.holes;
						if (!1 === mo.isClockWise(d))
							for (d = d.reverse(), i = 0, s = f.length; i < s; i++) l = f[i], !0 === mo.isClockWise(l) && (f[i] = l.reverse());
						var p = mo.triangulateShape(d, f);
						for (i = 0, s = f.length; i < s; i++) l = f[i], d = d.concat(l);
						for (i = 0, s = d.length; i < s; i++) {
							var m = d[i];
							r.push(m.x, m.y, 0), a.push(0, 0, 1), o.push(m.x, m.y)
						}
						for (i = 0, s = p.length; i < s; i++) {
							var g = p[i],
								v = g[0] + c,
								y = g[1] + c,
								b = g[2] + c;
							n.push(v, y, b), h += 3
						}
					}
					St.call(this), this.type = "ShapeBufferGeometry", this.parameters = {
						shapes: t,
						curveSegments: e
					}, e = e || 12;
					var n = [],
						r = [],
						a = [],
						o = [],
						s = 0,
						h = 0;
					if (!1 === Array.isArray(t)) i(t);
					else
						for (var l = 0; l < t.length; l++) i(t[l]), this.addGroup(s, h, l), s += h, h = 0;
					this.setIndex(n), this.addAttribute("position", new _t(r, 3)), this.addAttribute("normal", new _t(a, 3)), this.addAttribute("uv", new _t(o, 2))
				}

				function Pt(t, e, i, n, r, a) {
					dt.call(this), this.type = "BoxGeometry", this.parameters = {
						width: t,
						height: e,
						depth: i,
						widthSegments: n,
						heightSegments: r,
						depthSegments: a
					}, this.fromBufferGeometry(new kt(t, e, i, n, r, a)), this.mergeVertices()
				}

				function kt(t, e, i, n, r, o) {
					function s(t, e, i, n, r, o, s, m, g, v, y) {
						var b, x, _ = o / g,
							w = s / v,
							M = o / 2,
							T = s / 2,
							S = m / 2,
							E = g + 1,
							C = v + 1,
							P = 0,
							k = 0,
							A = new a;
						for (x = 0; x < C; x++) {
							var L = x * w - T;
							for (b = 0; b < E; b++) {
								var R = b * _ - M;
								A[t] = R * n, A[e] = L * r, A[i] = S, c.push(A.x, A.y, A.z), A[t] = 0, A[e] = 0, A[i] = m > 0 ? 1 : -1, u.push(A.x, A.y, A.z), d.push(b / g), d.push(1 - x / v), P += 1
							}
						}
						for (x = 0; x < v; x++)
							for (b = 0; b < g; b++) {
								var O = f + b + E * x,
									I = f + b + E * (x + 1),
									B = f + (b + 1) + E * (x + 1),
									U = f + (b + 1) + E * x;
								l.push(O, I, U), l.push(I, B, U), k += 6
							}
						h.addGroup(p, k, y), p += k, f += P
					}
					St.call(this), this.type = "BoxBufferGeometry", this.parameters = {
						width: t,
						height: e,
						depth: i,
						widthSegments: n,
						heightSegments: r,
						depthSegments: o
					};
					var h = this;
					t = t || 1, e = e || 1, i = i || 1, n = Math.floor(n) || 1, r = Math.floor(r) || 1;
					var l = [],
						c = [],
						u = [],
						d = [],
						f = 0,
						p = 0;
					s("z", "y", "x", -1, -1, i, e, t, o = Math.floor(o) || 1, r, 0), s("z", "y", "x", 1, -1, i, e, -t, o, r, 1), s("x", "z", "y", 1, 1, t, i, e, n, o, 2), s("x", "z", "y", 1, -1, t, i, -e, n, o, 3), s("x", "y", "z", 1, -1, t, e, i, n, r, 4), s("x", "y", "z", -1, -1, t, e, -i, n, r, 5), this.setIndex(l), this.addAttribute("position", new _t(c, 3)), this.addAttribute("normal", new _t(u, 3)), this.addAttribute("uv", new _t(d, 2))
				}

				function At(t, e, i, n) {
					dt.call(this), this.type = "PlaneGeometry", this.parameters = {
						width: t,
						height: e,
						widthSegments: i,
						heightSegments: n
					}, this.fromBufferGeometry(new Lt(t, e, i, n)), this.mergeVertices()
				}

				function Lt(t, e, i, n) {
					St.call(this), this.type = "PlaneBufferGeometry", this.parameters = {
						width: t,
						height: e,
						widthSegments: i,
						heightSegments: n
					};
					var r, a, o = (t = t || 1) / 2,
						s = (e = e || 1) / 2,
						h = Math.floor(i) || 1,
						l = Math.floor(n) || 1,
						c = h + 1,
						u = l + 1,
						d = t / h,
						f = e / l,
						p = [],
						m = [],
						g = [],
						v = [];
					for (a = 0; a < u; a++) {
						var y = a * f - s;
						for (r = 0; r < c; r++) {
							var b = r * d - o;
							m.push(b, -y, 0), g.push(0, 0, 1), v.push(r / h), v.push(1 - a / l)
						}
					}
					for (a = 0; a < l; a++)
						for (r = 0; r < h; r++) {
							var x = r + c * a,
								_ = r + c * (a + 1),
								w = r + 1 + c * (a + 1),
								M = r + 1 + c * a;
							p.push(x, _, M), p.push(_, w, M)
						}
					this.setIndex(p), this.addAttribute("position", new _t(m, 3)), this.addAttribute("normal", new _t(g, 3)), this.addAttribute("uv", new _t(v, 2))
				}

				function Rt(t) {
					J.call(this), this.type = "MeshBasicMaterial", this.color = new q(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = Ur, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.lights = !1, this.setValues(t)
				}

				function Ot(t) {
					J.call(this), this.type = "ShaderMaterial", this.defines = {}, this.uniforms = {}, this.vertexShader = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}", this.fragmentShader = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}", this.linewidth = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.lights = !1, this.clipping = !1, this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.extensions = {
						derivatives: !1,
						fragDepth: !1,
						drawBuffers: !1,
						shaderTextureLOD: !1
					}, this.defaultAttributeValues = {
						color: [1, 1, 1],
						uv: [0, 0],
						uv2: [0, 0]
					}, this.index0AttributeName = void 0, void 0 !== t && (void 0 !== t.attributes && console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."), this.setValues(t))
				}

				function It(t, e) {
					this.origin = void 0 !== t ? t : new a, this.direction = void 0 !== e ? e : new a
				}

				function Bt(t, e) {
					this.start = void 0 !== t ? t : new a, this.end = void 0 !== e ? e : new a
				}

				function Ut(t, e, i) {
					this.a = void 0 !== t ? t : new a, this.b = void 0 !== e ? e : new a, this.c = void 0 !== i ? i : new a
				}

				function Dt(t, e) {
					ht.call(this), this.type = "Mesh", this.geometry = void 0 !== t ? t : new St, this.material = void 0 !== e ? e : new Rt({
						color: 16777215 * Math.random()
					}), this.drawMode = Da, this.updateMorphTargets()
				}

				function zt(t, e) {
					return t.renderOrder !== e.renderOrder ? t.renderOrder - e.renderOrder : t.program && e.program && t.program !== e.program ? t.program.id - e.program.id : t.material.id !== e.material.id ? t.material.id - e.material.id : t.z !== e.z ? t.z - e.z : t.id - e.id
				}

				function jt(t, e) {
					return t.renderOrder !== e.renderOrder ? t.renderOrder - e.renderOrder : t.z !== e.z ? e.z - t.z : t.id - e.id
				}

				function Nt() {
					function t(t, i) {
						var n = t.id + "," + i.id,
							r = e[n];
						return void 0 === r && (r = new function () {
							var t = [],
								e = 0,
								i = [],
								n = [];
							return {
								opaque: i,
								transparent: n,
								init: function () {
									e = 0, i.length = 0, n.length = 0
								},
								push: function (r, a, o, s, h) {
									var l = t[e];
									void 0 === l ? (l = {
										id: r.id,
										object: r,
										geometry: a,
										material: o,
										program: o.program,
										renderOrder: r.renderOrder,
										z: s,
										group: h
									}, t[e] = l) : (l.id = r.id, l.object = r, l.geometry = a, l.material = o, l.program = o.program, l.renderOrder = r.renderOrder, l.z = s, l.group = h), (!0 === o.transparent ? n : i).push(l), e++
								},
								sort: function () {
									i.length > 1 && i.sort(zt), n.length > 1 && n.sort(jt)
								}
							}
						}, e[n] = r), r
					}
					var e = {};
					return {
						get: t,
						dispose: function () {
							e = {}
						}
					}
				}

				function Ft(t, e) {
					return Math.abs(e[1]) - Math.abs(t[1])
				}

				function Gt() {
					var t = new function () {
							var t = {};
							return {
								get: function (e) {
									if (void 0 !== t[e.id]) return t[e.id];
									var n;
									switch (e.type) {
										case "DirectionalLight":
											n = {
												direction: new a,
												color: new q,
												shadow: !1,
												shadowBias: 0,
												shadowRadius: 1,
												shadowMapSize: new i
											};
											break;
										case "SpotLight":
											n = {
												position: new a,
												direction: new a,
												color: new q,
												distance: 0,
												coneCos: 0,
												penumbraCos: 0,
												decay: 0,
												shadow: !1,
												shadowBias: 0,
												shadowRadius: 1,
												shadowMapSize: new i
											};
											break;
										case "PointLight":
											n = {
												position: new a,
												color: new q,
												distance: 0,
												decay: 0,
												shadow: !1,
												shadowBias: 0,
												shadowRadius: 1,
												shadowMapSize: new i,
												shadowCameraNear: 1,
												shadowCameraFar: 1e3
											};
											break;
										case "HemisphereLight":
											n = {
												direction: new a,
												skyColor: new q,
												groundColor: new q
											};
											break;
										case "RectAreaLight":
											n = {
												color: new q,
												position: new a,
												halfWidth: new a,
												halfHeight: new a
											}
									}
									return t[e.id] = n, n
								}
							}
						},
						e = {
							hash: "",
							ambient: [0, 0, 0],
							directional: [],
							directionalShadowMap: [],
							directionalShadowMatrix: [],
							spot: [],
							spotShadowMap: [],
							spotShadowMatrix: [],
							rectArea: [],
							point: [],
							pointShadowMap: [],
							pointShadowMatrix: [],
							hemi: []
						},
						r = new a,
						o = new n,
						s = new n;
					return {
						setup: function (i, n, a) {
							for (var h = 0, l = 0, c = 0, u = 0, d = 0, f = 0, p = 0, m = 0, g = a.matrixWorldInverse, v = 0, y = i.length; v < y; v++) {
								var b = i[v],
									x = b.color,
									_ = b.intensity,
									w = b.distance,
									M = b.shadow && b.shadow.map ? b.shadow.map.texture : null;
								if (b.isAmbientLight) h += x.r * _, l += x.g * _, c += x.b * _;
								else if (b.isDirectionalLight)(S = t.get(b)).color.copy(b.color).multiplyScalar(b.intensity), S.direction.setFromMatrixPosition(b.matrixWorld), r.setFromMatrixPosition(b.target.matrixWorld), S.direction.sub(r), S.direction.transformDirection(g), S.shadow = b.castShadow, b.castShadow && (T = b.shadow, S.shadowBias = T.bias, S.shadowRadius = T.radius, S.shadowMapSize = T.mapSize), e.directionalShadowMap[u] = M, e.directionalShadowMatrix[u] = b.shadow.matrix, e.directional[u] = S, u++;
								else if (b.isSpotLight)(S = t.get(b)).position.setFromMatrixPosition(b.matrixWorld), S.position.applyMatrix4(g), S.color.copy(x).multiplyScalar(_), S.distance = w, S.direction.setFromMatrixPosition(b.matrixWorld), r.setFromMatrixPosition(b.target.matrixWorld), S.direction.sub(r), S.direction.transformDirection(g), S.coneCos = Math.cos(b.angle), S.penumbraCos = Math.cos(b.angle * (1 - b.penumbra)), S.decay = 0 === b.distance ? 0 : b.decay, S.shadow = b.castShadow, b.castShadow && (T = b.shadow, S.shadowBias = T.bias, S.shadowRadius = T.radius, S.shadowMapSize = T.mapSize), e.spotShadowMap[f] = M, e.spotShadowMatrix[f] = b.shadow.matrix, e.spot[f] = S, f++;
								else if (b.isRectAreaLight)(S = t.get(b)).color.copy(x).multiplyScalar(_ / (b.width * b.height)), S.position.setFromMatrixPosition(b.matrixWorld), S.position.applyMatrix4(g), s.identity(), o.copy(b.matrixWorld), o.premultiply(g), s.extractRotation(o), S.halfWidth.set(.5 * b.width, 0, 0), S.halfHeight.set(0, .5 * b.height, 0), S.halfWidth.applyMatrix4(s), S.halfHeight.applyMatrix4(s), e.rectArea[p] = S, p++;
								else if (b.isPointLight) {
									if ((S = t.get(b)).position.setFromMatrixPosition(b.matrixWorld), S.position.applyMatrix4(g), S.color.copy(b.color).multiplyScalar(b.intensity), S.distance = b.distance, S.decay = 0 === b.distance ? 0 : b.decay, S.shadow = b.castShadow, b.castShadow) {
										var T = b.shadow;
										S.shadowBias = T.bias, S.shadowRadius = T.radius, S.shadowMapSize = T.mapSize, S.shadowCameraNear = T.camera.near, S.shadowCameraFar = T.camera.far
									}
									e.pointShadowMap[d] = M, e.pointShadowMatrix[d] = b.shadow.matrix, e.point[d] = S, d++
								} else if (b.isHemisphereLight) {
									var S = t.get(b);
									S.direction.setFromMatrixPosition(b.matrixWorld), S.direction.transformDirection(g), S.direction.normalize(), S.skyColor.copy(b.color).multiplyScalar(_), S.groundColor.copy(b.groundColor).multiplyScalar(_), e.hemi[m] = S, m++
								}
							}
							e.ambient[0] = h, e.ambient[1] = l, e.ambient[2] = c, e.directional.length = u, e.spot.length = f, e.rectArea.length = p, e.point.length = d, e.hemi.length = m, e.hash = u + "," + d + "," + f + "," + p + "," + m + "," + n.length
						},
						state: e
					}
				}

				function Ht(t, e, i) {
					var n = t.createShader(e);
					return t.shaderSource(n, i), t.compileShader(n), !1 === t.getShaderParameter(n, t.COMPILE_STATUS) && console.error("THREE.WebGLShader: Shader couldn't compile."), "" !== t.getShaderInfoLog(n) && console.warn("THREE.WebGLShader: gl.getShaderInfoLog()", e === t.VERTEX_SHADER ? "vertex" : "fragment", t.getShaderInfoLog(n), function (t) {
						for (var e = t.split("\n"), i = 0; i < e.length; i++) e[i] = i + 1 + ": " + e[i];
						return e.join("\n")
					}(i)), n
				}

				function Vt(t) {
					switch (t) {
						case Na:
							return ["Linear", "( value )"];
						case Fa:
							return ["sRGB", "( value )"];
						case Ha:
							return ["RGBE", "( value )"];
						case Va:
							return ["RGBM", "( value, 7.0 )"];
						case Wa:
							return ["RGBM", "( value, 16.0 )"];
						case qa:
							return ["RGBD", "( value, 256.0 )"];
						case Ga:
							return ["Gamma", "( value, float( GAMMA_FACTOR ) )"];
						default:
							throw new Error("unsupported encoding: " + t)
					}
				}

				function Wt(t, e) {
					var i = Vt(e);
					return "vec4 " + t + "( vec4 value ) { return " + i[0] + "ToLinear" + i[1] + "; }"
				}

				function qt(t) {
					return "" !== t
				}

				function Xt(t, e) {
					return t.replace(/NUM_DIR_LIGHTS/g, e.numDirLights).replace(/NUM_SPOT_LIGHTS/g, e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g, e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, e.numPointLights).replace(/NUM_HEMI_LIGHTS/g, e.numHemiLights)
				}

				function Kt(t) {
					return t.replace(/^[ \t]*#include +<([\w\d.]+)>/gm, function (t, e) {
						var i = so[e];
						if (void 0 === i) throw new Error("Can not resolve #include <" + e + ">");
						return Kt(i)
					})
				}

				function Yt(t) {
					return t.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g, function (t, e, i, n) {
						for (var r = "", a = parseInt(e); a < parseInt(i); a++) r += n.replace(/\[ i \]/g, "[ " + a + " ]");
						return r
					})
				}

				function Zt(t, e, i, n, r, a) {
					var o = t.context,
						s = n.defines,
						h = r.vertexShader,
						l = r.fragmentShader,
						c = "SHADOWMAP_TYPE_BASIC";
					a.shadowMapType === Qn ? c = "SHADOWMAP_TYPE_PCF" : a.shadowMapType === $n && (c = "SHADOWMAP_TYPE_PCF_SOFT");
					var u = "ENVMAP_TYPE_CUBE",
						d = "ENVMAP_MODE_REFLECTION",
						f = "ENVMAP_BLENDING_MULTIPLY";
					if (a.envMap) {
						switch (n.envMap.mapping) {
							case Vr:
							case Wr:
								u = "ENVMAP_TYPE_CUBE";
								break;
							case Yr:
							case Zr:
								u = "ENVMAP_TYPE_CUBE_UV";
								break;
							case qr:
							case Xr:
								u = "ENVMAP_TYPE_EQUIREC";
								break;
							case Kr:
								u = "ENVMAP_TYPE_SPHERE"
						}
						switch (n.envMap.mapping) {
							case Wr:
							case Xr:
								d = "ENVMAP_MODE_REFRACTION"
						}
						switch (n.combine) {
							case Ur:
								f = "ENVMAP_BLENDING_MULTIPLY";
								break;
							case Dr:
								f = "ENVMAP_BLENDING_MIX";
								break;
							case zr:
								f = "ENVMAP_BLENDING_ADD"
						}
					}
					var p, m, g = t.gammaFactor > 0 ? t.gammaFactor : 1,
						v = function (t, e, i) {
							return [(t = t || {}).derivatives || e.envMapCubeUV || e.bumpMap || e.normalMap || e.flatShading ? "#extension GL_OES_standard_derivatives : enable" : "", (t.fragDepth || e.logarithmicDepthBuffer) && i.get("EXT_frag_depth") ? "#extension GL_EXT_frag_depth : enable" : "", t.drawBuffers && i.get("WEBGL_draw_buffers") ? "#extension GL_EXT_draw_buffers : require" : "", (t.shaderTextureLOD || e.envMap) && i.get("EXT_shader_texture_lod") ? "#extension GL_EXT_shader_texture_lod : enable" : ""].filter(qt).join("\n")
						}(n.extensions, a, e),
						y = function (t) {
							var e = [];
							for (var i in t) {
								var n = t[i];
								!1 !== n && e.push("#define " + i + " " + n)
							}
							return e.join("\n")
						}(s),
						b = o.createProgram();
					n.isRawShaderMaterial ? ((p = [y].filter(qt).join("\n")).length > 0 && (p += "\n"), (m = [v, y].filter(qt).join("\n")).length > 0 && (m += "\n")) : (p = ["precision " + a.precision + " float;", "precision " + a.precision + " int;", "#define SHADER_NAME " + r.name, y, a.supportsVertexTextures ? "#define VERTEX_TEXTURES" : "", "#define GAMMA_FACTOR " + g, "#define MAX_BONES " + a.maxBones, a.useFog && a.fog ? "#define USE_FOG" : "", a.useFog && a.fogExp ? "#define FOG_EXP2" : "", a.map ? "#define USE_MAP" : "", a.envMap ? "#define USE_ENVMAP" : "", a.envMap ? "#define " + d : "", a.lightMap ? "#define USE_LIGHTMAP" : "", a.aoMap ? "#define USE_AOMAP" : "", a.emissiveMap ? "#define USE_EMISSIVEMAP" : "", a.bumpMap ? "#define USE_BUMPMAP" : "", a.normalMap ? "#define USE_NORMALMAP" : "", a.displacementMap && a.supportsVertexTextures ? "#define USE_DISPLACEMENTMAP" : "", a.specularMap ? "#define USE_SPECULARMAP" : "", a.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", a.metalnessMap ? "#define USE_METALNESSMAP" : "", a.alphaMap ? "#define USE_ALPHAMAP" : "", a.vertexColors ? "#define USE_COLOR" : "", a.flatShading ? "#define FLAT_SHADED" : "", a.skinning ? "#define USE_SKINNING" : "", a.useVertexTexture ? "#define BONE_TEXTURE" : "", a.morphTargets ? "#define USE_MORPHTARGETS" : "", a.morphNormals && !1 === a.flatShading ? "#define USE_MORPHNORMALS" : "", a.doubleSided ? "#define DOUBLE_SIDED" : "", a.flipSided ? "#define FLIP_SIDED" : "", "#define NUM_CLIPPING_PLANES " + a.numClippingPlanes, a.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", a.shadowMapEnabled ? "#define " + c : "", a.sizeAttenuation ? "#define USE_SIZEATTENUATION" : "", a.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", a.logarithmicDepthBuffer && e.get("EXT_frag_depth") ? "#define USE_LOGDEPTHBUF_EXT" : "", "uniform mat4 modelMatrix;", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform mat4 viewMatrix;", "uniform mat3 normalMatrix;", "uniform vec3 cameraPosition;", "attribute vec3 position;", "attribute vec3 normal;", "attribute vec2 uv;", "#ifdef USE_COLOR", "\tattribute vec3 color;", "#endif", "#ifdef USE_MORPHTARGETS", "\tattribute vec3 morphTarget0;", "\tattribute vec3 morphTarget1;", "\tattribute vec3 morphTarget2;", "\tattribute vec3 morphTarget3;", "\t#ifdef USE_MORPHNORMALS", "\t\tattribute vec3 morphNormal0;", "\t\tattribute vec3 morphNormal1;", "\t\tattribute vec3 morphNormal2;", "\t\tattribute vec3 morphNormal3;", "\t#else", "\t\tattribute vec3 morphTarget4;", "\t\tattribute vec3 morphTarget5;", "\t\tattribute vec3 morphTarget6;", "\t\tattribute vec3 morphTarget7;", "\t#endif", "#endif", "#ifdef USE_SKINNING", "\tattribute vec4 skinIndex;", "\tattribute vec4 skinWeight;", "#endif", "\n"].filter(qt).join("\n"), m = [v, "precision " + a.precision + " float;", "precision " + a.precision + " int;", "#define SHADER_NAME " + r.name, y, a.alphaTest ? "#define ALPHATEST " + a.alphaTest : "", "#define GAMMA_FACTOR " + g, a.useFog && a.fog ? "#define USE_FOG" : "", a.useFog && a.fogExp ? "#define FOG_EXP2" : "", a.map ? "#define USE_MAP" : "", a.envMap ? "#define USE_ENVMAP" : "", a.envMap ? "#define " + u : "", a.envMap ? "#define " + d : "", a.envMap ? "#define " + f : "", a.lightMap ? "#define USE_LIGHTMAP" : "", a.aoMap ? "#define USE_AOMAP" : "", a.emissiveMap ? "#define USE_EMISSIVEMAP" : "", a.bumpMap ? "#define USE_BUMPMAP" : "", a.normalMap ? "#define USE_NORMALMAP" : "", a.specularMap ? "#define USE_SPECULARMAP" : "", a.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", a.metalnessMap ? "#define USE_METALNESSMAP" : "", a.alphaMap ? "#define USE_ALPHAMAP" : "", a.vertexColors ? "#define USE_COLOR" : "", a.gradientMap ? "#define USE_GRADIENTMAP" : "", a.flatShading ? "#define FLAT_SHADED" : "", a.doubleSided ? "#define DOUBLE_SIDED" : "", a.flipSided ? "#define FLIP_SIDED" : "", "#define NUM_CLIPPING_PLANES " + a.numClippingPlanes, "#define UNION_CLIPPING_PLANES " + (a.numClippingPlanes - a.numClipIntersection), a.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", a.shadowMapEnabled ? "#define " + c : "", a.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : "", a.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : "", a.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", a.logarithmicDepthBuffer && e.get("EXT_frag_depth") ? "#define USE_LOGDEPTHBUF_EXT" : "", a.envMap && e.get("EXT_shader_texture_lod") ? "#define TEXTURE_LOD_EXT" : "", "uniform mat4 viewMatrix;", "uniform vec3 cameraPosition;", a.toneMapping !== jr ? "#define TONE_MAPPING" : "", a.toneMapping !== jr ? so.tonemapping_pars_fragment : "", a.toneMapping !== jr ? function (t, e) {
						var i;
						switch (e) {
							case Nr:
								i = "Linear";
								break;
							case Fr:
								i = "Reinhard";
								break;
							case Gr:
								i = "Uncharted2";
								break;
							case Hr:
								i = "OptimizedCineon";
								break;
							default:
								throw new Error("unsupported toneMapping: " + e)
						}
						return "vec3 " + t + "( vec3 color ) { return " + i + "ToneMapping( color ); }"
					}("toneMapping", a.toneMapping) : "", a.dithering ? "#define DITHERING" : "", a.outputEncoding || a.mapEncoding || a.envMapEncoding || a.emissiveMapEncoding ? so.encodings_pars_fragment : "", a.mapEncoding ? Wt("mapTexelToLinear", a.mapEncoding) : "", a.envMapEncoding ? Wt("envMapTexelToLinear", a.envMapEncoding) : "", a.emissiveMapEncoding ? Wt("emissiveMapTexelToLinear", a.emissiveMapEncoding) : "", a.outputEncoding ? function (t, e) {
						var i = Vt(e);
						return "vec4 " + t + "( vec4 value ) { return LinearTo" + i[0] + i[1] + "; }"
					}("linearToOutputTexel", a.outputEncoding) : "", a.depthPacking ? "#define DEPTH_PACKING " + n.depthPacking : "", "\n"].filter(qt).join("\n")), h = Xt(h = Kt(h), a), l = Xt(l = Kt(l), a), n.isShaderMaterial || (h = Yt(h), l = Yt(l));
					var x = p + h,
						_ = m + l,
						w = Ht(o, o.VERTEX_SHADER, x),
						M = Ht(o, o.FRAGMENT_SHADER, _);
					o.attachShader(b, w), o.attachShader(b, M), void 0 !== n.index0AttributeName ? o.bindAttribLocation(b, 0, n.index0AttributeName) : !0 === a.morphTargets && o.bindAttribLocation(b, 0, "position"), o.linkProgram(b);
					var T = o.getProgramInfoLog(b),
						S = o.getShaderInfoLog(w),
						E = o.getShaderInfoLog(M),
						C = !0,
						P = !0;
					!1 === o.getProgramParameter(b, o.LINK_STATUS) ? (C = !1, console.error("THREE.WebGLProgram: shader error: ", o.getError(), "gl.VALIDATE_STATUS", o.getProgramParameter(b, o.VALIDATE_STATUS), "gl.getProgramInfoLog", T, S, E)) : "" !== T ? console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()", T) : "" !== S && "" !== E || (P = !1), P && (this.diagnostics = {
						runnable: C,
						material: n,
						programLog: T,
						vertexShader: {
							log: S,
							prefix: p
						},
						fragmentShader: {
							log: E,
							prefix: m
						}
					}), o.deleteShader(w), o.deleteShader(M);
					var k;
					this.getUniforms = function () {
						return void 0 === k && (k = new W(o, b, t)), k
					};
					var A;
					return this.getAttributes = function () {
						return void 0 === A && (A = function (t, e) {
							for (var i = {}, n = t.getProgramParameter(e, t.ACTIVE_ATTRIBUTES), r = 0; r < n; r++) {
								var a = t.getActiveAttrib(e, r).name;
								i[a] = t.getAttribLocation(e, a)
							}
							return i
						}(o, b)), A
					}, this.destroy = function () {
						o.deleteProgram(b), this.program = void 0
					}, Object.defineProperties(this, {
						uniforms: {
							get: function () {
								return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."), this.getUniforms()
							}
						},
						attributes: {
							get: function () {
								return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."), this.getAttributes()
							}
						}
					}), this.id = po++, this.code = i, this.usedTimes = 1, this.program = b, this.vertexShader = w, this.fragmentShader = M, this
				}

				function Jt(t, e, i) {
					function n(t, e) {
						var i;
						return t ? t.isTexture ? i = t.encoding : t.isWebGLRenderTarget && (console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."), i = t.texture.encoding) : i = Na, i === Na && e && (i = Ga), i
					}
					var r = [],
						a = {
							MeshDepthMaterial: "depth",
							MeshDistanceMaterial: "distanceRGBA",
							MeshNormalMaterial: "normal",
							MeshBasicMaterial: "basic",
							MeshLambertMaterial: "lambert",
							MeshPhongMaterial: "phong",
							MeshToonMaterial: "phong",
							MeshStandardMaterial: "physical",
							MeshPhysicalMaterial: "physical",
							LineBasicMaterial: "basic",
							LineDashedMaterial: "dashed",
							PointsMaterial: "points",
							ShadowMaterial: "shadow"
						},
						o = ["precision", "supportsVertexTextures", "map", "mapEncoding", "envMap", "envMapMode", "envMapEncoding", "lightMap", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "displacementMap", "specularMap", "roughnessMap", "metalnessMap", "gradientMap", "alphaMap", "combine", "vertexColors", "fog", "useFog", "fogExp", "flatShading", "sizeAttenuation", "logarithmicDepthBuffer", "skinning", "maxBones", "useVertexTexture", "morphTargets", "morphNormals", "maxMorphTargets", "maxMorphNormals", "premultipliedAlpha", "numDirLights", "numPointLights", "numSpotLights", "numHemiLights", "numRectAreaLights", "shadowMapEnabled", "shadowMapType", "toneMapping", "physicallyCorrectLights", "alphaTest", "doubleSided", "flipSided", "numClippingPlanes", "numClipIntersection", "depthPacking", "dithering"];
					this.getParameters = function (e, r, o, s, h, l, c) {
						var u = a[e.type],
							d = c.isSkinnedMesh ? function (t) {
								var e = t.skeleton.bones;
								if (i.floatVertexTextures) return 1024;
								var n = i.maxVertexUniforms,
									r = Math.floor((n - 20) / 4),
									a = Math.min(r, e.length);
								return a < e.length ? (console.warn("THREE.WebGLRenderer: Skeleton has " + e.length + " bones. This GPU supports " + a + "."), 0) : a
							}(c) : 0,
							f = i.precision;
						null !== e.precision && (f = i.getMaxPrecision(e.precision)) !== e.precision && console.warn("THREE.WebGLProgram.getParameters:", e.precision, "not supported, using", f, "instead.");
						var p = t.getRenderTarget();
						return {
							shaderID: u,
							precision: f,
							supportsVertexTextures: i.vertexTextures,
							outputEncoding: n(p ? p.texture : null, t.gammaOutput),
							map: !!e.map,
							mapEncoding: n(e.map, t.gammaInput),
							envMap: !!e.envMap,
							envMapMode: e.envMap && e.envMap.mapping,
							envMapEncoding: n(e.envMap, t.gammaInput),
							envMapCubeUV: !!e.envMap && (e.envMap.mapping === Yr || e.envMap.mapping === Zr),
							lightMap: !!e.lightMap,
							aoMap: !!e.aoMap,
							emissiveMap: !!e.emissiveMap,
							emissiveMapEncoding: n(e.emissiveMap, t.gammaInput),
							bumpMap: !!e.bumpMap,
							normalMap: !!e.normalMap,
							displacementMap: !!e.displacementMap,
							roughnessMap: !!e.roughnessMap,
							metalnessMap: !!e.metalnessMap,
							specularMap: !!e.specularMap,
							alphaMap: !!e.alphaMap,
							gradientMap: !!e.gradientMap,
							combine: e.combine,
							vertexColors: e.vertexColors,
							fog: !!s,
							useFog: e.fog,
							fogExp: s && s.isFogExp2,
							flatShading: e.flatShading,
							sizeAttenuation: e.sizeAttenuation,
							logarithmicDepthBuffer: i.logarithmicDepthBuffer,
							skinning: e.skinning && d > 0,
							maxBones: d,
							useVertexTexture: i.floatVertexTextures,
							morphTargets: e.morphTargets,
							morphNormals: e.morphNormals,
							maxMorphTargets: t.maxMorphTargets,
							maxMorphNormals: t.maxMorphNormals,
							numDirLights: r.directional.length,
							numPointLights: r.point.length,
							numSpotLights: r.spot.length,
							numRectAreaLights: r.rectArea.length,
							numHemiLights: r.hemi.length,
							numClippingPlanes: h,
							numClipIntersection: l,
							dithering: e.dithering,
							shadowMapEnabled: t.shadowMap.enabled && c.receiveShadow && o.length > 0,
							shadowMapType: t.shadowMap.type,
							toneMapping: t.toneMapping,
							physicallyCorrectLights: t.physicallyCorrectLights,
							premultipliedAlpha: e.premultipliedAlpha,
							alphaTest: e.alphaTest,
							doubleSided: e.side === ir,
							flipSided: e.side === er,
							depthPacking: void 0 !== e.depthPacking && e.depthPacking
						}
					}, this.getProgramCode = function (e, i) {
						var n = [];
						if (i.shaderID ? n.push(i.shaderID) : (n.push(e.fragmentShader), n.push(e.vertexShader)), void 0 !== e.defines)
							for (var r in e.defines) n.push(r), n.push(e.defines[r]);
						for (var a = 0; a < o.length; a++) n.push(i[o[a]]);
						return n.push(e.onBeforeCompile.toString()), n.push(t.gammaOutput), n.join()
					}, this.acquireProgram = function (i, n, a, o) {
						for (var s, h = 0, l = r.length; h < l; h++) {
							var c = r[h];
							if (c.code === o) {
								++(s = c).usedTimes;
								break
							}
						}
						return void 0 === s && (s = new Zt(t, e, o, i, n, a), r.push(s)), s
					}, this.releaseProgram = function (t) {
						if (0 == --t.usedTimes) {
							var e = r.indexOf(t);
							r[e] = r[r.length - 1], r.pop(), t.destroy()
						}
					}, this.programs = r
				}

				function Qt(t, e, i, n, r, a, o) {
					function s(t, e) {
						if (t.width > e || t.height > e) {
							var i = e / Math.max(t.width, t.height),
								n = document.createElement("canvas");
							n.width = Math.floor(t.width * i), n.height = Math.floor(t.height * i);
							return n.getContext("2d").drawImage(t, 0, 0, t.width, t.height, 0, 0, n.width, n.height), console.warn("THREE.WebGLRenderer: image is too big (" + t.width + "x" + t.height + "). Resized to " + n.width + "x" + n.height, t), n
						}
						return t
					}

					function h(t) {
						return Ya.isPowerOfTwo(t.width) && Ya.isPowerOfTwo(t.height)
					}

					function l(t, e) {
						return t.generateMipmaps && e && t.minFilter !== ta && t.minFilter !== na
					}

					function c(e) {
						return e === ta || e === ea || e === ia ? t.NEAREST : t.LINEAR
					}

					function u(e) {
						var i = e.target;
						i.removeEventListener("dispose", u),
							function (e) {
								var i = n.get(e);
								if (e.image && i.__image__webglTextureCube) t.deleteTexture(i.__image__webglTextureCube);
								else {
									if (void 0 === i.__webglInit) return;
									t.deleteTexture(i.__webglTexture)
								}
								n.remove(e)
							}(i), o.textures--
					}

					function d(e) {
						var i = e.target;
						i.removeEventListener("dispose", d),
							function (e) {
								var i = n.get(e),
									r = n.get(e.texture);
								if (!e) return;
								void 0 !== r.__webglTexture && t.deleteTexture(r.__webglTexture);
								e.depthTexture && e.depthTexture.dispose();
								if (e.isWebGLRenderTargetCube)
									for (var a = 0; a < 6; a++) t.deleteFramebuffer(i.__webglFramebuffer[a]), i.__webglDepthbuffer && t.deleteRenderbuffer(i.__webglDepthbuffer[a]);
								else t.deleteFramebuffer(i.__webglFramebuffer), i.__webglDepthbuffer && t.deleteRenderbuffer(i.__webglDepthbuffer);
								n.remove(e.texture), n.remove(e)
							}(i), o.textures--
					}

					function f(e, c) {
						var d = n.get(e);
						if (e.version > 0 && d.__version !== e.version) {
							var f = e.image;
							if (void 0 === f) console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined", e);
							else {
								if (!1 !== f.complete) return void
								function (e, n, c) {
									void 0 === e.__webglInit && (e.__webglInit = !0, n.addEventListener("dispose", u), e.__webglTexture = t.createTexture(), o.textures++);
									i.activeTexture(t.TEXTURE0 + c), i.bindTexture(t.TEXTURE_2D, e.__webglTexture), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, n.flipY), t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL, n.premultiplyAlpha), t.pixelStorei(t.UNPACK_ALIGNMENT, n.unpackAlignment);
									var d = s(n.image, r.maxTextureSize);
									(function (t) {
										return t.wrapS !== Qr || t.wrapT !== Qr || t.minFilter !== ta && t.minFilter !== na
									})(n) && !1 === h(d) && (d = function (t) {
										if (t instanceof HTMLImageElement || t instanceof HTMLCanvasElement) {
											var e = document.createElement("canvas");
											return e.width = Ya.floorPowerOfTwo(t.width), e.height = Ya.floorPowerOfTwo(t.height), e.getContext("2d").drawImage(t, 0, 0, e.width, e.height), console.warn("THREE.WebGLRenderer: image is not power of two (" + t.width + "x" + t.height + "). Resized to " + e.width + "x" + e.height, t), e
										}
										return t
									}(d));
									var f = h(d),
										m = a.convert(n.format),
										g = a.convert(n.type);
									p(t.TEXTURE_2D, n, f);
									var v, b = n.mipmaps;
									if (n.isDepthTexture) {
										var x = t.DEPTH_COMPONENT;
										if (n.type === da) {
											if (!y) throw new Error("Float Depth Texture only supported in WebGL2.0");
											x = t.DEPTH_COMPONENT32F
										} else y && (x = t.DEPTH_COMPONENT16);
										n.format === Ta && x === t.DEPTH_COMPONENT && n.type !== la && n.type !== ua && (console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."), n.type = la, g = a.convert(n.type)), n.format === Sa && (x = t.DEPTH_STENCIL, n.type !== va && (console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."), n.type = va, g = a.convert(n.type))), i.texImage2D(t.TEXTURE_2D, 0, x, d.width, d.height, 0, m, g, null)
									} else if (n.isDataTexture)
										if (b.length > 0 && f) {
											for (var _ = 0, w = b.length; _ < w; _++) v = b[_], i.texImage2D(t.TEXTURE_2D, _, m, v.width, v.height, 0, m, g, v.data);
											n.generateMipmaps = !1
										} else i.texImage2D(t.TEXTURE_2D, 0, m, d.width, d.height, 0, m, g, d.data);
									else if (n.isCompressedTexture)
										for (var _ = 0, w = b.length; _ < w; _++) v = b[_], n.format !== xa && n.format !== ba ? i.getCompressedTextureFormats().indexOf(m) > -1 ? i.compressedTexImage2D(t.TEXTURE_2D, _, m, v.width, v.height, 0, v.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : i.texImage2D(t.TEXTURE_2D, _, m, v.width, v.height, 0, m, g, v.data);
									else if (b.length > 0 && f) {
										for (var _ = 0, w = b.length; _ < w; _++) v = b[_], i.texImage2D(t.TEXTURE_2D, _, m, m, g, v);
										n.generateMipmaps = !1
									} else i.texImage2D(t.TEXTURE_2D, 0, m, m, g, d);
									l(n, f) && t.generateMipmap(t.TEXTURE_2D);
									e.__version = n.version, n.onUpdate && n.onUpdate(n)
								}(d, e, c);
								console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete", e)
							}
						}
						i.activeTexture(t.TEXTURE0 + c), i.bindTexture(t.TEXTURE_2D, d.__webglTexture)
					}

					function p(i, o, s) {
						var h;
						if (s ? (t.texParameteri(i, t.TEXTURE_WRAP_S, a.convert(o.wrapS)), t.texParameteri(i, t.TEXTURE_WRAP_T, a.convert(o.wrapT)), t.texParameteri(i, t.TEXTURE_MAG_FILTER, a.convert(o.magFilter)), t.texParameteri(i, t.TEXTURE_MIN_FILTER, a.convert(o.minFilter))) : (t.texParameteri(i, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(i, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), o.wrapS === Qr && o.wrapT === Qr || console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.", o), t.texParameteri(i, t.TEXTURE_MAG_FILTER, c(o.magFilter)), t.texParameteri(i, t.TEXTURE_MIN_FILTER, c(o.minFilter)), o.minFilter !== ta && o.minFilter !== na && (o.minFilter = na), o.minFilter !== ta && o.minFilter !== na && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.", o)), h = e.get("EXT_texture_filter_anisotropic")) {
							if (o.type === da && null === e.get("OES_texture_float_linear")) return;
							if (o.type === fa && null === e.get("OES_texture_half_float_linear")) return;
							(o.anisotropy > 1 || n.get(o).__currentAnisotropy) && (t.texParameterf(i, h.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(o.anisotropy, r.getMaxAnisotropy())), n.get(o).__currentAnisotropy = o.anisotropy)
						}
					}

					function m(e, r, o, s) {
						var h = a.convert(r.texture.format),
							l = a.convert(r.texture.type);
						i.texImage2D(s, 0, h, r.width, r.height, 0, h, l, null), t.bindFramebuffer(t.FRAMEBUFFER, e), t.framebufferTexture2D(t.FRAMEBUFFER, o, s, n.get(r.texture).__webglTexture, 0), t.bindFramebuffer(t.FRAMEBUFFER, null)
					}

					function g(e, i) {
						t.bindRenderbuffer(t.RENDERBUFFER, e), i.depthBuffer && !i.stencilBuffer ? (t.renderbufferStorage(t.RENDERBUFFER, t.DEPTH_COMPONENT16, i.width, i.height), t.framebufferRenderbuffer(t.FRAMEBUFFER, t.DEPTH_ATTACHMENT, t.RENDERBUFFER, e)) : i.depthBuffer && i.stencilBuffer ? (t.renderbufferStorage(t.RENDERBUFFER, t.DEPTH_STENCIL, i.width, i.height), t.framebufferRenderbuffer(t.FRAMEBUFFER, t.DEPTH_STENCIL_ATTACHMENT, t.RENDERBUFFER, e)) : t.renderbufferStorage(t.RENDERBUFFER, t.RGBA4, i.width, i.height), t.bindRenderbuffer(t.RENDERBUFFER, null)
					}

					function v(e) {
						var i = n.get(e),
							r = !0 === e.isWebGLRenderTargetCube;
						if (e.depthTexture) {
							if (r) throw new Error("target.depthTexture not supported in Cube render targets");
							! function (e, i) {
								if (i && i.isWebGLRenderTargetCube) throw new Error("Depth Texture with cube render targets is not supported");
								if (t.bindFramebuffer(t.FRAMEBUFFER, e), !i.depthTexture || !i.depthTexture.isDepthTexture) throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
								n.get(i.depthTexture).__webglTexture && i.depthTexture.image.width === i.width && i.depthTexture.image.height === i.height || (i.depthTexture.image.width = i.width, i.depthTexture.image.height = i.height, i.depthTexture.needsUpdate = !0), f(i.depthTexture, 0);
								var r = n.get(i.depthTexture).__webglTexture;
								if (i.depthTexture.format === Ta) t.framebufferTexture2D(t.FRAMEBUFFER, t.DEPTH_ATTACHMENT, t.TEXTURE_2D, r, 0);
								else {
									if (i.depthTexture.format !== Sa) throw new Error("Unknown depthTexture format");
									t.framebufferTexture2D(t.FRAMEBUFFER, t.DEPTH_STENCIL_ATTACHMENT, t.TEXTURE_2D, r, 0)
								}
							}(i.__webglFramebuffer, e)
						} else if (r) {
							i.__webglDepthbuffer = [];
							for (var a = 0; a < 6; a++) t.bindFramebuffer(t.FRAMEBUFFER, i.__webglFramebuffer[a]), i.__webglDepthbuffer[a] = t.createRenderbuffer(), g(i.__webglDepthbuffer[a], e)
						} else t.bindFramebuffer(t.FRAMEBUFFER, i.__webglFramebuffer), i.__webglDepthbuffer = t.createRenderbuffer(), g(i.__webglDepthbuffer, e);
						t.bindFramebuffer(t.FRAMEBUFFER, null)
					}
					var y = "undefined" != typeof WebGL2RenderingContext && t instanceof window.WebGL2RenderingContext;
					this.setTexture2D = f, this.setTextureCube = function (e, c) {
						var d = n.get(e);
						if (6 === e.image.length)
							if (e.version > 0 && d.__version !== e.version) {
								d.__image__webglTextureCube || (e.addEventListener("dispose", u), d.__image__webglTextureCube = t.createTexture(), o.textures++), i.activeTexture(t.TEXTURE0 + c), i.bindTexture(t.TEXTURE_CUBE_MAP, d.__image__webglTextureCube), t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL, e.flipY);
								for (var f = e && e.isCompressedTexture, m = e.image[0] && e.image[0].isDataTexture, g = [], v = 0; v < 6; v++) g[v] = f || m ? m ? e.image[v].image : e.image[v] : s(e.image[v], r.maxCubemapSize);
								var y = h(g[0]),
									b = a.convert(e.format),
									x = a.convert(e.type);
								for (p(t.TEXTURE_CUBE_MAP, e, y), v = 0; v < 6; v++)
									if (f)
										for (var _, w = g[v].mipmaps, M = 0, T = w.length; M < T; M++) _ = w[M], e.format !== xa && e.format !== ba ? i.getCompressedTextureFormats().indexOf(b) > -1 ? i.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X + v, M, b, _.width, _.height, 0, _.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X + v, M, b, _.width, _.height, 0, b, x, _.data);
									else m ? i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X + v, 0, b, g[v].width, g[v].height, 0, b, x, g[v].data) : i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X + v, 0, b, b, x, g[v]);
								l(e, y) && t.generateMipmap(t.TEXTURE_CUBE_MAP), d.__version = e.version, e.onUpdate && e.onUpdate(e)
							} else i.activeTexture(t.TEXTURE0 + c), i.bindTexture(t.TEXTURE_CUBE_MAP, d.__image__webglTextureCube)
					}, this.setTextureCubeDynamic = function (e, r) {
						i.activeTexture(t.TEXTURE0 + r), i.bindTexture(t.TEXTURE_CUBE_MAP, n.get(e).__webglTexture)
					}, this.setupRenderTarget = function (e) {
						var r = n.get(e),
							a = n.get(e.texture);
						e.addEventListener("dispose", d), a.__webglTexture = t.createTexture(), o.textures++;
						var s = !0 === e.isWebGLRenderTargetCube,
							c = h(e);
						if (s)
							for (r.__webglFramebuffer = [], u = 0; u < 6; u++) r.__webglFramebuffer[u] = t.createFramebuffer();
						else r.__webglFramebuffer = t.createFramebuffer();
						if (s) {
							i.bindTexture(t.TEXTURE_CUBE_MAP, a.__webglTexture), p(t.TEXTURE_CUBE_MAP, e.texture, c);
							for (var u = 0; u < 6; u++) m(r.__webglFramebuffer[u], e, t.COLOR_ATTACHMENT0, t.TEXTURE_CUBE_MAP_POSITIVE_X + u);
							l(e.texture, c) && t.generateMipmap(t.TEXTURE_CUBE_MAP), i.bindTexture(t.TEXTURE_CUBE_MAP, null)
						} else i.bindTexture(t.TEXTURE_2D, a.__webglTexture), p(t.TEXTURE_2D, e.texture, c), m(r.__webglFramebuffer, e, t.COLOR_ATTACHMENT0, t.TEXTURE_2D), l(e.texture, c) && t.generateMipmap(t.TEXTURE_2D), i.bindTexture(t.TEXTURE_2D, null);
						e.depthBuffer && v(e)
					}, this.updateRenderTargetMipmap = function (e) {
						var r = e.texture;
						if (l(r, h(e))) {
							var a = e.isWebGLRenderTargetCube ? t.TEXTURE_CUBE_MAP : t.TEXTURE_2D,
								o = n.get(r).__webglTexture;
							i.bindTexture(a, o), t.generateMipmap(a), i.bindTexture(a, null)
						}
					}
				}

				function $t(t, e, i, n) {
					lt.call(this), this.type = "PerspectiveCamera", this.fov = void 0 !== t ? t : 50, this.zoom = 1, this.near = void 0 !== i ? i : .1, this.far = void 0 !== n ? n : 2e3, this.focus = 10, this.aspect = void 0 !== e ? e : 1, this.view = null, this.filmGauge = 35, this.filmOffset = 0, this.updateProjectionMatrix()
				}

				function te(t) {
					$t.call(this), this.cameras = t || []
				}

				function ee(t, e) {
					return {
						convert: function (i) {
							var n;
							if (i === Jr) return t.REPEAT;
							if (i === Qr) return t.CLAMP_TO_EDGE;
							if (i === $r) return t.MIRRORED_REPEAT;
							if (i === ta) return t.NEAREST;
							if (i === ea) return t.NEAREST_MIPMAP_NEAREST;
							if (i === ia) return t.NEAREST_MIPMAP_LINEAR;
							if (i === na) return t.LINEAR;
							if (i === ra) return t.LINEAR_MIPMAP_NEAREST;
							if (i === aa) return t.LINEAR_MIPMAP_LINEAR;
							if (i === oa) return t.UNSIGNED_BYTE;
							if (i === pa) return t.UNSIGNED_SHORT_4_4_4_4;
							if (i === ma) return t.UNSIGNED_SHORT_5_5_5_1;
							if (i === ga) return t.UNSIGNED_SHORT_5_6_5;
							if (i === sa) return t.BYTE;
							if (i === ha) return t.SHORT;
							if (i === la) return t.UNSIGNED_SHORT;
							if (i === ca) return t.INT;
							if (i === ua) return t.UNSIGNED_INT;
							if (i === da) return t.FLOAT;
							if (i === fa && null !== (n = e.get("OES_texture_half_float"))) return n.HALF_FLOAT_OES;
							if (i === ya) return t.ALPHA;
							if (i === ba) return t.RGB;
							if (i === xa) return t.RGBA;
							if (i === _a) return t.LUMINANCE;
							if (i === wa) return t.LUMINANCE_ALPHA;
							if (i === Ta) return t.DEPTH_COMPONENT;
							if (i === Sa) return t.DEPTH_STENCIL;
							if (i === dr) return t.FUNC_ADD;
							if (i === fr) return t.FUNC_SUBTRACT;
							if (i === pr) return t.FUNC_REVERSE_SUBTRACT;
							if (i === vr) return t.ZERO;
							if (i === yr) return t.ONE;
							if (i === br) return t.SRC_COLOR;
							if (i === xr) return t.ONE_MINUS_SRC_COLOR;
							if (i === _r) return t.SRC_ALPHA;
							if (i === wr) return t.ONE_MINUS_SRC_ALPHA;
							if (i === Mr) return t.DST_ALPHA;
							if (i === Tr) return t.ONE_MINUS_DST_ALPHA;
							if (i === Sr) return t.DST_COLOR;
							if (i === Er) return t.ONE_MINUS_DST_COLOR;
							if (i === Cr) return t.SRC_ALPHA_SATURATE;
							if ((i === Ea || i === Ca || i === Pa || i === ka) && null !== (n = e.get("WEBGL_compressed_texture_s3tc"))) {
								if (i === Ea) return n.COMPRESSED_RGB_S3TC_DXT1_EXT;
								if (i === Ca) return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;
								if (i === Pa) return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;
								if (i === ka) return n.COMPRESSED_RGBA_S3TC_DXT5_EXT
							}
							if ((i === Aa || i === La || i === Ra || i === Oa) && null !== (n = e.get("WEBGL_compressed_texture_pvrtc"))) {
								if (i === Aa) return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
								if (i === La) return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
								if (i === Ra) return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
								if (i === Oa) return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
							}
							if (i === Ia && null !== (n = e.get("WEBGL_compressed_texture_etc1"))) return n.COMPRESSED_RGB_ETC1_WEBGL;
							if ((i === mr || i === gr) && null !== (n = e.get("EXT_blend_minmax"))) {
								if (i === mr) return n.MIN_EXT;
								if (i === gr) return n.MAX_EXT
							}
							return i === va && null !== (n = e.get("WEBGL_depth_texture")) ? n.UNSIGNED_INT_24_8_WEBGL : 0
						}
					}
				}

				function ie(t) {
					function e() {
						return null === U ? Q : 1
					}

					function i() {
						(vt = new function (t) {
							var e = {};
							return {
								get: function (i) {
									if (void 0 !== e[i]) return e[i];
									var n;
									switch (i) {
										case "WEBGL_depth_texture":
											n = t.getExtension("WEBGL_depth_texture") || t.getExtension("MOZ_WEBGL_depth_texture") || t.getExtension("WEBKIT_WEBGL_depth_texture");
											break;
										case "EXT_texture_filter_anisotropic":
											n = t.getExtension("EXT_texture_filter_anisotropic") || t.getExtension("MOZ_EXT_texture_filter_anisotropic") || t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");
											break;
										case "WEBGL_compressed_texture_s3tc":
											n = t.getExtension("WEBGL_compressed_texture_s3tc") || t.getExtension("MOZ_WEBGL_compressed_texture_s3tc") || t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");
											break;
										case "WEBGL_compressed_texture_pvrtc":
											n = t.getExtension("WEBGL_compressed_texture_pvrtc") || t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");
											break;
										case "WEBGL_compressed_texture_etc1":
											n = t.getExtension("WEBGL_compressed_texture_etc1");
											break;
										default:
											n = t.getExtension(i)
									}
									return null === n && console.warn("THREE.WebGLRenderer: " + i + " extension not supported."), e[i] = n, n
								}
							}
						}(mt)).get("WEBGL_depth_texture"), vt.get("OES_texture_float"), vt.get("OES_texture_float_linear"), vt.get("OES_texture_half_float"), vt.get("OES_texture_half_float_linear"), vt.get("OES_standard_derivatives"), vt.get("OES_element_index_uint"), vt.get("ANGLE_instanced_arrays"), qt = new ee(mt, vt), bt = new function (t, e, i) {
							function n(e) {
								if ("highp" === e) {
									if (t.getShaderPrecisionFormat(t.VERTEX_SHADER, t.HIGH_FLOAT).precision > 0 && t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.HIGH_FLOAT).precision > 0) return "highp";
									e = "mediump"
								}
								return "mediump" === e && t.getShaderPrecisionFormat(t.VERTEX_SHADER, t.MEDIUM_FLOAT).precision > 0 && t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp"
							}
							var r, a = void 0 !== i.precision ? i.precision : "highp",
								o = n(a);
							o !== a && (console.warn("THREE.WebGLRenderer:", a, "not supported, using", o, "instead."), a = o);
							var s = !0 === i.logarithmicDepthBuffer,
								h = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),
								l = t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),
								c = t.getParameter(t.MAX_TEXTURE_SIZE),
								u = t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),
								d = t.getParameter(t.MAX_VERTEX_ATTRIBS),
								f = t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),
								p = t.getParameter(t.MAX_VARYING_VECTORS),
								m = t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),
								g = l > 0,
								v = !!e.get("OES_texture_float");
							return {
								getMaxAnisotropy: function () {
									if (void 0 !== r) return r;
									var i = e.get("EXT_texture_filter_anisotropic");
									return r = null !== i ? t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 0
								},
								getMaxPrecision: n,
								precision: a,
								logarithmicDepthBuffer: s,
								maxTextures: h,
								maxVertexTextures: l,
								maxTextureSize: c,
								maxCubemapSize: u,
								maxAttributes: d,
								maxVertexUniforms: f,
								maxVaryings: p,
								maxFragmentUniforms: m,
								vertexTextures: g,
								floatFragmentTextures: v,
								floatVertexTextures: g && v
							}
						}(mt, vt, t), (_t = new function (t, e, i) {
							function n(e, i, n) {
								var r = new Uint8Array(4),
									a = t.createTexture();
								t.bindTexture(e, a), t.texParameteri(e, t.TEXTURE_MIN_FILTER, t.NEAREST), t.texParameteri(e, t.TEXTURE_MAG_FILTER, t.NEAREST);
								for (var o = 0; o < n; o++) t.texImage2D(i + o, 0, t.RGBA, 1, 1, 0, t.RGBA, t.UNSIGNED_BYTE, r);
								return a
							}

							function r(e) {
								!0 !== b[e] && (t.enable(e), b[e] = !0)
							}

							function a(e) {
								!1 !== b[e] && (t.disable(e), b[e] = !1)
							}

							function o(e, n, o, s, h, l, c, u) {
								if (e !== or ? r(t.BLEND) : a(t.BLEND), e !== ur) {
									if (e !== w || u !== k) switch (e) {
										case hr:
											u ? (t.blendEquationSeparate(t.FUNC_ADD, t.FUNC_ADD), t.blendFuncSeparate(t.ONE, t.ONE, t.ONE, t.ONE)) : (t.blendEquation(t.FUNC_ADD), t.blendFunc(t.SRC_ALPHA, t.ONE));
											break;
										case lr:
											u ? (t.blendEquationSeparate(t.FUNC_ADD, t.FUNC_ADD), t.blendFuncSeparate(t.ZERO, t.ZERO, t.ONE_MINUS_SRC_COLOR, t.ONE_MINUS_SRC_ALPHA)) : (t.blendEquation(t.FUNC_ADD), t.blendFunc(t.ZERO, t.ONE_MINUS_SRC_COLOR));
											break;
										case cr:
											u ? (t.blendEquationSeparate(t.FUNC_ADD, t.FUNC_ADD), t.blendFuncSeparate(t.ZERO, t.SRC_COLOR, t.ZERO, t.SRC_ALPHA)) : (t.blendEquation(t.FUNC_ADD), t.blendFunc(t.ZERO, t.SRC_COLOR));
											break;
										default:
											u ? (t.blendEquationSeparate(t.FUNC_ADD, t.FUNC_ADD), t.blendFuncSeparate(t.ONE, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA)) : (t.blendEquationSeparate(t.FUNC_ADD, t.FUNC_ADD), t.blendFuncSeparate(t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA))
									}
									M = null, T = null, S = null, E = null, C = null, P = null
								} else h = h || n, l = l || o, c = c || s, n === M && h === E || (t.blendEquationSeparate(i.convert(n), i.convert(h)), M = n, E = h), o === T && s === S && l === C && c === P || (t.blendFuncSeparate(i.convert(o), i.convert(s), i.convert(l), i.convert(c)), T = o, S = s, C = l, P = c);
								w = e, k = u
							}

							function s(e) {
								A !== e && (e ? t.frontFace(t.CW) : t.frontFace(t.CCW), A = e)
							}

							function h(e) {
								e !== Kn ? (r(t.CULL_FACE), e !== L && (e === Yn ? t.cullFace(t.BACK) : e === Zn ? t.cullFace(t.FRONT) : t.cullFace(t.FRONT_AND_BACK))) : a(t.CULL_FACE), L = e
							}

							function c(e, i, n) {
								e ? (r(t.POLYGON_OFFSET_FILL), O === i && I === n || (t.polygonOffset(i, n), O = i, I = n)) : a(t.POLYGON_OFFSET_FILL)
							}

							function u(e) {
								void 0 === e && (e = t.TEXTURE0 + B - 1), D !== e && (t.activeTexture(e), D = e)
							}
							var d = new function () {
									var e = !1,
										i = new l,
										n = null,
										r = new l(0, 0, 0, 0);
									return {
										setMask: function (i) {
											n === i || e || (t.colorMask(i, i, i, i), n = i)
										},
										setLocked: function (t) {
											e = t
										},
										setClear: function (e, n, a, o, s) {
											!0 === s && (e *= o, n *= o, a *= o), i.set(e, n, a, o), !1 === r.equals(i) && (t.clearColor(e, n, a, o), r.copy(i))
										},
										reset: function () {
											e = !1, n = null, r.set(-1, 0, 0, 0)
										}
									}
								},
								f = new function () {
									var e = !1,
										i = null,
										n = null,
										o = null;
									return {
										setTest: function (e) {
											e ? r(t.DEPTH_TEST) : a(t.DEPTH_TEST)
										},
										setMask: function (n) {
											i === n || e || (t.depthMask(n), i = n)
										},
										setFunc: function (e) {
											if (n !== e) {
												if (e) switch (e) {
													case Pr:
														t.depthFunc(t.NEVER);
														break;
													case kr:
														t.depthFunc(t.ALWAYS);
														break;
													case Ar:
														t.depthFunc(t.LESS);
														break;
													case Lr:
														t.depthFunc(t.LEQUAL);
														break;
													case Rr:
														t.depthFunc(t.EQUAL);
														break;
													case Or:
														t.depthFunc(t.GEQUAL);
														break;
													case Ir:
														t.depthFunc(t.GREATER);
														break;
													case Br:
														t.depthFunc(t.NOTEQUAL);
														break;
													default:
														t.depthFunc(t.LEQUAL)
												} else t.depthFunc(t.LEQUAL);
												n = e
											}
										},
										setLocked: function (t) {
											e = t
										},
										setClear: function (e) {
											o !== e && (t.clearDepth(e), o = e)
										},
										reset: function () {
											e = !1, i = null, n = null, o = null
										}
									}
								},
								p = new function () {
									var e = !1,
										i = null,
										n = null,
										o = null,
										s = null,
										h = null,
										l = null,
										c = null,
										u = null;
									return {
										setTest: function (e) {
											e ? r(t.STENCIL_TEST) : a(t.STENCIL_TEST)
										},
										setMask: function (n) {
											i === n || e || (t.stencilMask(n), i = n)
										},
										setFunc: function (e, i, r) {
											n === e && o === i && s === r || (t.stencilFunc(e, i, r), n = e, o = i, s = r)
										},
										setOp: function (e, i, n) {
											h === e && l === i && c === n || (t.stencilOp(e, i, n), h = e, l = i, c = n)
										},
										setLocked: function (t) {
											e = t
										},
										setClear: function (e) {
											u !== e && (t.clearStencil(e), u = e)
										},
										reset: function () {
											e = !1, i = null, n = null, o = null, s = null, h = null, l = null, c = null, u = null
										}
									}
								},
								m = t.getParameter(t.MAX_VERTEX_ATTRIBS),
								g = new Uint8Array(m),
								v = new Uint8Array(m),
								y = new Uint8Array(m),
								b = {},
								x = null,
								_ = null,
								w = null,
								M = null,
								T = null,
								S = null,
								E = null,
								C = null,
								P = null,
								k = !1,
								A = null,
								L = null,
								R = null,
								O = null,
								I = null,
								B = t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),
								U = !0,
								D = null,
								z = {},
								j = new l,
								N = new l,
								F = {};
							return F[t.TEXTURE_2D] = n(t.TEXTURE_2D, t.TEXTURE_2D, 1), F[t.TEXTURE_CUBE_MAP] = n(t.TEXTURE_CUBE_MAP, t.TEXTURE_CUBE_MAP_POSITIVE_X, 6), d.setClear(0, 0, 0, 1), f.setClear(1), p.setClear(0), r(t.DEPTH_TEST), f.setFunc(Lr), s(!1), h(Yn), r(t.CULL_FACE), r(t.BLEND), o(sr), {
								buffers: {
									color: d,
									depth: f,
									stencil: p
								},
								initAttributes: function () {
									for (var t = 0, e = g.length; t < e; t++) g[t] = 0
								},
								enableAttribute: function (i) {
									g[i] = 1, 0 === v[i] && (t.enableVertexAttribArray(i), v[i] = 1), 0 !== y[i] && (e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(i, 0), y[i] = 0)
								},
								enableAttributeAndDivisor: function (i, n) {
									g[i] = 1, 0 === v[i] && (t.enableVertexAttribArray(i), v[i] = 1), y[i] !== n && (e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(i, n), y[i] = n)
								},
								disableUnusedAttributes: function () {
									for (var e = 0, i = v.length; e !== i; ++e) v[e] !== g[e] && (t.disableVertexAttribArray(e), v[e] = 0)
								},
								enable: r,
								disable: a,
								getCompressedTextureFormats: function () {
									if (null === x && (x = [], e.get("WEBGL_compressed_texture_pvrtc") || e.get("WEBGL_compressed_texture_s3tc") || e.get("WEBGL_compressed_texture_etc1")))
										for (var i = t.getParameter(t.COMPRESSED_TEXTURE_FORMATS), n = 0; n < i.length; n++) x.push(i[n]);
									return x
								},
								useProgram: function (e) {
									return _ !== e && (t.useProgram(e), _ = e, !0)
								},
								setBlending: o,
								setMaterial: function (e) {
									e.side === ir ? a(t.CULL_FACE) : r(t.CULL_FACE), s(e.side === er), !0 === e.transparent ? o(e.blending, e.blendEquation, e.blendSrc, e.blendDst, e.blendEquationAlpha, e.blendSrcAlpha, e.blendDstAlpha, e.premultipliedAlpha) : o(or), f.setFunc(e.depthFunc), f.setTest(e.depthTest), f.setMask(e.depthWrite), d.setMask(e.colorWrite), c(e.polygonOffset, e.polygonOffsetFactor, e.polygonOffsetUnits)
								},
								setFlipSided: s,
								setCullFace: h,
								setLineWidth: function (e) {
									e !== R && (U && t.lineWidth(e), R = e)
								},
								setPolygonOffset: c,
								setScissorTest: function (e) {
									e ? r(t.SCISSOR_TEST) : a(t.SCISSOR_TEST)
								},
								activeTexture: u,
								bindTexture: function (e, i) {
									null === D && u();
									var n = z[D];
									void 0 === n && (n = {
										type: void 0,
										texture: void 0
									}, z[D] = n), n.type === e && n.texture === i || (t.bindTexture(e, i || F[e]), n.type = e, n.texture = i)
								},
								compressedTexImage2D: function () {
									try {
										t.compressedTexImage2D.apply(t, arguments)
									} catch (t) {
										console.error("THREE.WebGLState:", t)
									}
								},
								texImage2D: function () {
									try {
										t.texImage2D.apply(t, arguments)
									} catch (t) {
										console.error("THREE.WebGLState:", t)
									}
								},
								scissor: function (e) {
									!1 === j.equals(e) && (t.scissor(e.x, e.y, e.z, e.w), j.copy(e))
								},
								viewport: function (e) {
									!1 === N.equals(e) && (t.viewport(e.x, e.y, e.z, e.w), N.copy(e))
								},
								reset: function () {
									for (var e = 0; e < v.length; e++) 1 === v[e] && (t.disableVertexAttribArray(e), v[e] = 0);
									b = {}, x = null, D = null, z = {}, _ = null, w = null, A = null, L = null, d.reset(), f.reset(), p.reset()
								}
							}
						}(mt, vt, qt)).scissor(H.copy(tt).multiplyScalar(Q)), _t.viewport(G.copy($).multiplyScalar(Q)), wt = new function () {
							var t = {};
							return {
								get: function (e) {
									var i = e.uuid,
										n = t[i];
									return void 0 === n && (n = {}, t[i] = n), n
								},
								remove: function (e) {
									delete t[e.uuid]
								},
								clear: function () {
									t = {}
								}
							}
						}, Mt = new Qt(mt, vt, _t, wt, bt, qt, ft), Et = new at(mt), Ct = new function (t, e, i) {
							function n(t) {
								var o = t.target,
									s = r[o.id];
								null !== s.index && e.remove(s.index);
								for (var h in s.attributes) e.remove(s.attributes[h]);
								o.removeEventListener("dispose", n), delete r[o.id];
								var l = a[o.id];
								l && (e.remove(l), delete a[o.id]), (l = a[s.id]) && (e.remove(l), delete a[s.id]), i.geometries--
							}
							var r = {},
								a = {};
							return {
								get: function (t, e) {
									var a = r[e.id];
									return a || (e.addEventListener("dispose", n), e.isBufferGeometry ? a = e : e.isGeometry && (void 0 === e._bufferGeometry && (e._bufferGeometry = (new St).setFromObject(t)), a = e._bufferGeometry), r[e.id] = a, i.geometries++, a)
								},
								update: function (i) {
									var n = i.index,
										r = i.attributes;
									null !== n && e.update(n, t.ELEMENT_ARRAY_BUFFER);
									for (var a in r) e.update(r[a], t.ARRAY_BUFFER);
									var o = i.morphAttributes;
									for (var a in o)
										for (var s = o[a], h = 0, l = s.length; h < l; h++) e.update(s[h], t.ARRAY_BUFFER)
								},
								getWireframeAttribute: function (i) {
									var n = a[i.id];
									if (n) return n;
									var r = [],
										o = i.index,
										s = i.attributes;
									if (null !== o)
										for (var h = 0, l = (f = o.array).length; h < l; h += 3) {
											var c = f[h + 0],
												u = f[h + 1],
												d = f[h + 2];
											r.push(c, u, u, d, d, c)
										} else
											for (var f = s.position.array, h = 0, l = f.length / 3 - 1; h < l; h += 3) {
												var c = h + 0,
													u = h + 1,
													d = h + 2;
												r.push(c, u, u, d, d, c)
											}
									return n = new(Tt(r) > 65535 ? xt : yt)(r, 1), e.update(n, t.ELEMENT_ARRAY_BUFFER), a[i.id] = n, n
								}
							}
						}(mt, Et, ft), Pt = new function (t, e) {
							var i = {};
							return {
								update: function (n) {
									var r = e.frame,
										a = n.geometry,
										o = t.get(n, a);
									return i[o.id] !== r && (a.isGeometry && o.updateFromObject(n), t.update(o), i[o.id] = r), o
								},
								clear: function () {
									i = {}
								}
							}
						}(Ct, pt), zt = new function (t) {
							var e = {},
								i = new Float32Array(8);
							return {
								update: function (n, r, a, o) {
									var s = n.morphTargetInfluences,
										h = s.length,
										l = e[r.id];
									if (void 0 === l) {
										for (l = [], d = 0; d < h; d++) l[d] = [d, 0];
										e[r.id] = l
									}
									for (var c = a.morphTargets && r.morphAttributes.position, u = a.morphNormals && r.morphAttributes.normal, d = 0; d < h; d++) 0 !== (f = l[d])[1] && (c && r.removeAttribute("morphTarget" + d), u && r.removeAttribute("morphNormal" + d));
									for (d = 0; d < h; d++)(f = l[d])[0] = d, f[1] = s[d];
									for (l.sort(Ft), d = 0; d < 8; d++) {
										var f = l[d];
										if (f) {
											var p = f[0],
												m = f[1];
											if (m) {
												c && r.addAttribute("morphTarget" + d, c[p]), u && r.addAttribute("morphNormal" + d, u[p]), i[d] = m;
												continue
											}
										}
										i[d] = 0
									}
									o.getUniforms().setValue(t, "morphTargetInfluences", i)
								}
							}
						}(mt), It = new Jt(I, vt, bt), At = new Gt, Bt = new Nt, Ut = new function (t, e, i, n) {
							function r(t, i) {
								e.buffers.color.setClear(t.r, t.g, t.b, i, n)
							}
							var a, o, s, h = new q(0),
								l = 0;
							return {
								getClearColor: function () {
									return h
								},
								setClearColor: function (t, e) {
									h.set(t), r(h, l = void 0 !== e ? e : 1)
								},
								getClearAlpha: function () {
									return l
								},
								setClearAlpha: function (t) {
									r(h, l = t)
								},
								render: function (e, n, c, u) {
									var d = n.background;
									null === d ? r(h, l) : d && d.isColor && (r(d, 1), u = !0), (t.autoClear || u) && t.clear(t.autoClearColor, t.autoClearDepth, t.autoClearStencil), d && d.isCubeTexture ? (void 0 === s && ((s = new Dt(new kt(1, 1, 1), new Ot({
										uniforms: ho.cube.uniforms,
										vertexShader: ho.cube.vertexShader,
										fragmentShader: ho.cube.fragmentShader,
										side: er,
										depthTest: !0,
										depthWrite: !1,
										fog: !1
									}))).geometry.removeAttribute("normal"), s.geometry.removeAttribute("uv"), s.onBeforeRender = function (t, e, i) {
										this.matrixWorld.copyPosition(i.matrixWorld)
									}, i.update(s.geometry)), s.material.uniforms.tCube.value = d, e.push(s, s.geometry, s.material, 0, null)) : d && d.isTexture && (void 0 === a && (a = new ct(-1, 1, 1, -1, 0, 1), o = new Dt(new Lt(2, 2), new Rt({
										depthTest: !1,
										depthWrite: !1,
										fog: !1
									})), i.update(o.geometry)), o.material.map = d, t.renderBufferDirect(a, null, o.geometry, o.material, o, null))
								}
							}
						}(I, _t, Ct, C), jt = new function (t, e, i) {
							var n;
							this.setMode = function (t) {
								n = t
							}, this.render = function (e, r) {
								t.drawArrays(n, e, r), i.calls++, i.vertices += r, n === t.TRIANGLES ? i.faces += r / 3 : n === t.POINTS && (i.points += r)
							}, this.renderInstances = function (r, a, o) {
								var s = e.get("ANGLE_instanced_arrays");
								if (null !== s) {
									var h = r.attributes.position;
									h.isInterleavedBufferAttribute ? (o = h.data.count, s.drawArraysInstancedANGLE(n, 0, o, r.maxInstancedCount)) : s.drawArraysInstancedANGLE(n, a, o, r.maxInstancedCount), i.calls++, i.vertices += o * r.maxInstancedCount, n === t.TRIANGLES ? i.faces += r.maxInstancedCount * o / 3 : n === t.POINTS && (i.points += r.maxInstancedCount * o)
								} else console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")
							}
						}(mt, vt, pt), Ht = new function (t, e, i) {
							var n, r, a;
							this.setMode = function (t) {
								n = t
							}, this.setIndex = function (t) {
								r = t.type, a = t.bytesPerElement
							}, this.render = function (e, o) {
								t.drawElements(n, o, r, e * a), i.calls++, i.vertices += o, n === t.TRIANGLES ? i.faces += o / 3 : n === t.POINTS && (i.points += o)
							}, this.renderInstances = function (o, s, h) {
								var l = e.get("ANGLE_instanced_arrays");
								null !== l ? (l.drawElementsInstancedANGLE(n, h, r, s * a, o.maxInstancedCount), i.calls++, i.vertices += h * o.maxInstancedCount, n === t.TRIANGLES ? i.faces += o.maxInstancedCount * h / 3 : n === t.POINTS && (i.points += o.maxInstancedCount * h)) : console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")
							}
						}(mt, vt, pt), Vt = new K(I, mt, _t, Mt, bt), Wt = new Z(I, mt, _t, Mt, bt), I.info.programs = It.programs, I.context = mt, I.capabilities = bt, I.extensions = vt, I.properties = wt, I.renderLists = Bt, I.state = _t
					}

					function r(t) {
						t.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), B = !0
					}

					function o() {
						console.log("THREE.WebGLRenderer: Context Restored."), B = !1, i()
					}

					function h(t) {
						var e = t.target;
						e.removeEventListener("dispose", h),
							function (t) {
								c(t), wt.remove(t)
							}(e)
					}

					function c(t) {
						var e = wt.get(t).program;
						t.program = void 0, void 0 !== e && It.releaseProgram(e)
					}

					function u(t) {
						null !== Zt && Zt(t), (Xt.getDevice() || window).requestAnimationFrame(u)
					}

					function f(t, e, i) {
						if (!1 !== t.visible) {
							if (t.layers.test(e.layers))
								if (t.isLight) k.push(t), t.castShadow && A.push(t);
								else if (t.isSprite) t.frustumCulled && !ot.intersectsSprite(t) || R.push(t);
							else if (t.isLensFlare) O.push(t);
							else if (t.isImmediateRenderObject) i && dt.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ut), L.push(t, null, t.material, dt.z, null);
							else if ((t.isMesh || t.isLine || t.isPoints) && (t.isSkinnedMesh && t.skeleton.update(), !t.frustumCulled || ot.intersectsObject(t))) {
								i && dt.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ut);
								var n = Pt.update(t),
									r = t.material;
								if (Array.isArray(r))
									for (var a = n.groups, o = 0, s = a.length; o < s; o++) {
										var h = a[o],
											l = r[h.materialIndex];
										l && l.visible && L.push(t, n, l, dt.z, h)
									} else r.visible && L.push(t, n, r, dt.z, null)
							}
							for (var c = t.children, o = 0, s = c.length; o < s; o++) f(c[o], e, i)
						}
					}

					function p(t, e, i, n) {
						for (var r = 0, a = t.length; r < a; r++) {
							var o = t[r],
								s = o.object,
								h = o.geometry,
								l = void 0 === n ? o.material : n,
								c = o.group;
							if (i.isArrayCamera) {
								F = i;
								for (var u = i.cameras, d = 0, f = u.length; d < f; d++) {
									var p = u[d];
									if (s.layers.test(p.layers)) {
										var g = p.bounds,
											v = g.x * Y,
											y = g.y * J,
											b = g.z * Y,
											x = g.w * J;
										_t.viewport(G.set(v, y, b, x).multiplyScalar(Q)), m(s, e, p, h, l, c)
									}
								}
							} else F = null, m(s, e, i, h, l, c)
						}
					}

					function m(t, e, i, n, r, a) {
						if (t.onBeforeRender(I, e, i, n, r, a), t.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, t.matrixWorld), t.normalMatrix.getNormalMatrix(t.modelViewMatrix), t.isImmediateRenderObject) {
							_t.setMaterial(r);
							var o = v(i, e.fog, r, t);
							j = "",
								function (t, e, i) {
									t.render(function (t) {
										I.renderBufferImmediate(t, e, i)
									})
								}(t, o, r)
						} else I.renderBufferDirect(i, e.fog, n, r, t, a);
						t.onAfterRender(I, e, i, n, r, a)
					}

					function g(t, e, i) {
						var n = wt.get(t),
							r = It.getParameters(t, At.state, A, e, st.numPlanes, st.numIntersection, i),
							a = It.getProgramCode(t, r),
							o = n.program,
							s = !0;
						if (void 0 === o) t.addEventListener("dispose", h);
						else if (o.code !== a) c(t);
						else {
							if (void 0 !== r.shaderID) return;
							s = !1
						}
						if (s) {
							if (r.shaderID) {
								var l = ho[r.shaderID];
								n.shader = {
									name: t.type,
									uniforms: oo.clone(l.uniforms),
									vertexShader: l.vertexShader,
									fragmentShader: l.fragmentShader
								}
							} else n.shader = {
								name: t.type,
								uniforms: t.uniforms,
								vertexShader: t.vertexShader,
								fragmentShader: t.fragmentShader
							};
							t.onBeforeCompile(n.shader), o = It.acquireProgram(t, n.shader, r, a), n.program = o, t.program = o
						}
						var u = o.getAttributes();
						if (t.morphTargets) {
							t.numSupportedMorphTargets = 0;
							for (d = 0; d < I.maxMorphTargets; d++) u["morphTarget" + d] >= 0 && t.numSupportedMorphTargets++
						}
						if (t.morphNormals) {
							t.numSupportedMorphNormals = 0;
							for (var d = 0; d < I.maxMorphNormals; d++) u["morphNormal" + d] >= 0 && t.numSupportedMorphNormals++
						}
						var f = n.shader.uniforms;
						(t.isShaderMaterial || t.isRawShaderMaterial) && !0 !== t.clipping || (n.numClippingPlanes = st.numPlanes, n.numIntersection = st.numIntersection, f.clippingPlanes = st.uniform), n.fog = e, n.lightsHash = At.state.hash, t.lights && (f.ambientLightColor.value = At.state.ambient, f.directionalLights.value = At.state.directional, f.spotLights.value = At.state.spot, f.rectAreaLights.value = At.state.rectArea, f.pointLights.value = At.state.point, f.hemisphereLights.value = At.state.hemi, f.directionalShadowMap.value = At.state.directionalShadowMap, f.directionalShadowMatrix.value = At.state.directionalShadowMatrix, f.spotShadowMap.value = At.state.spotShadowMap, f.spotShadowMatrix.value = At.state.spotShadowMatrix, f.pointShadowMap.value = At.state.pointShadowMap, f.pointShadowMatrix.value = At.state.pointShadowMatrix);
						var p = n.program.getUniforms(),
							m = W.seqWithValue(p.seq, f);
						n.uniformsList = m
					}

					function v(t, e, i, n) {
						X = 0;
						var r = wt.get(i);
						if (ht && (lt || t !== N)) {
							var a = t === N && i.id === z;
							st.setState(i.clippingPlanes, i.clipIntersection, i.clipShadows, t, r, a)
						}!1 === i.needsUpdate && (void 0 === r.program ? i.needsUpdate = !0 : i.fog && r.fog !== e ? i.needsUpdate = !0 : i.lights && r.lightsHash !== At.state.hash ? i.needsUpdate = !0 : void 0 === r.numClippingPlanes || r.numClippingPlanes === st.numPlanes && r.numIntersection === st.numIntersection || (i.needsUpdate = !0)), i.needsUpdate && (g(i, e, n), i.needsUpdate = !1);
						var o = !1,
							s = !1,
							h = !1,
							l = r.program,
							c = l.getUniforms(),
							u = r.shader.uniforms;
						if (_t.useProgram(l.program) && (o = !0, s = !0, h = !0), i.id !== z && (z = i.id, s = !0), o || t !== N) {
							if (c.setValue(mt, "projectionMatrix", t.projectionMatrix), bt.logarithmicDepthBuffer && c.setValue(mt, "logDepthBufFC", 2 / (Math.log(t.far + 1) / Math.LN2)), N !== (F || t) && (N = F || t, s = !0, h = !0), i.isShaderMaterial || i.isMeshPhongMaterial || i.isMeshStandardMaterial || i.envMap) {
								var f = c.map.cameraPosition;
								void 0 !== f && f.setValue(mt, dt.setFromMatrixPosition(t.matrixWorld))
							}(i.isMeshPhongMaterial || i.isMeshLambertMaterial || i.isMeshBasicMaterial || i.isMeshStandardMaterial || i.isShaderMaterial || i.skinning) && c.setValue(mt, "viewMatrix", t.matrixWorldInverse)
						}
						if (i.skinning) {
							c.setOptional(mt, n, "bindMatrix"), c.setOptional(mt, n, "bindMatrixInverse");
							var p = n.skeleton;
							if (p) {
								var m = p.bones;
								if (bt.floatVertexTextures) {
									if (void 0 === p.boneTexture) {
										var v = Math.sqrt(4 * m.length);
										v = Ya.ceilPowerOfTwo(v), v = Math.max(v, 4);
										var _ = new Float32Array(v * v * 4);
										_.set(p.boneMatrices);
										var w = new d(_, v, v, xa, da);
										p.boneMatrices = _, p.boneTexture = w, p.boneTextureSize = v
									}
									c.setValue(mt, "boneTexture", p.boneTexture), c.setValue(mt, "boneTextureSize", p.boneTextureSize)
								} else c.setOptional(mt, p, "boneMatrices")
							}
						}
						return s && (c.setValue(mt, "toneMappingExposure", I.toneMappingExposure), c.setValue(mt, "toneMappingWhitePoint", I.toneMappingWhitePoint), i.lights && function (t, e) {
							t.ambientLightColor.needsUpdate = e, t.directionalLights.needsUpdate = e, t.pointLights.needsUpdate = e, t.spotLights.needsUpdate = e, t.rectAreaLights.needsUpdate = e, t.hemisphereLights.needsUpdate = e
						}(u, h), e && i.fog && function (t, e) {
							t.fogColor.value = e.color, e.isFog ? (t.fogNear.value = e.near, t.fogFar.value = e.far) : e.isFogExp2 && (t.fogDensity.value = e.density)
						}(u, e), i.isMeshBasicMaterial ? y(u, i) : i.isMeshLambertMaterial ? (y(u, i), function (t, e) {
							e.emissiveMap && (t.emissiveMap.value = e.emissiveMap)
						}(u, i)) : i.isMeshPhongMaterial ? (y(u, i), i.isMeshToonMaterial ? function (t, e) {
							b(t, e), e.gradientMap && (t.gradientMap.value = e.gradientMap)
						}(u, i) : b(u, i)) : i.isMeshStandardMaterial ? (y(u, i), i.isMeshPhysicalMaterial ? function (t, e) {
							t.clearCoat.value = e.clearCoat, t.clearCoatRoughness.value = e.clearCoatRoughness, x(t, e)
						}(u, i) : x(u, i)) : i.isMeshDepthMaterial ? (y(u, i), function (t, e) {
							e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias)
						}(u, i)) : i.isMeshDistanceMaterial ? (y(u, i), function (t, e) {
							e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias);
							t.referencePosition.value.copy(e.referencePosition), t.nearDistance.value = e.nearDistance, t.farDistance.value = e.farDistance
						}(u, i)) : i.isMeshNormalMaterial ? (y(u, i), function (t, e) {
							e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale);
							e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale));
							e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias)
						}(u, i)) : i.isLineBasicMaterial ? (function (t, e) {
							t.diffuse.value = e.color, t.opacity.value = e.opacity
						}(u, i), i.isLineDashedMaterial && function (t, e) {
							t.dashSize.value = e.dashSize, t.totalSize.value = e.dashSize + e.gapSize, t.scale.value = e.scale
						}(u, i)) : i.isPointsMaterial ? function (t, e) {
							if (t.diffuse.value = e.color, t.opacity.value = e.opacity, t.size.value = e.size * Q, t.scale.value = .5 * J, t.map.value = e.map, null !== e.map) {
								if (!0 === e.map.matrixAutoUpdate) {
									var i = e.map.offset,
										n = e.map.repeat,
										r = e.map.rotation,
										a = e.map.center;
									e.map.matrix.setUvTransform(i.x, i.y, n.x, n.y, r, a.x, a.y)
								}
								t.uvTransform.value.copy(e.map.matrix)
							}
						}(u, i) : i.isShadowMaterial && (u.color.value = i.color, u.opacity.value = i.opacity), void 0 !== u.ltcMat && (u.ltcMat.value = ao.LTC_MAT_TEXTURE), void 0 !== u.ltcMag && (u.ltcMag.value = ao.LTC_MAG_TEXTURE), W.upload(mt, r.uniformsList, u, I)), c.setValue(mt, "modelViewMatrix", n.modelViewMatrix), c.setValue(mt, "normalMatrix", n.normalMatrix), c.setValue(mt, "modelMatrix", n.matrixWorld), l
					}

					function y(t, e) {
						t.opacity.value = e.opacity, e.color && (t.diffuse.value = e.color), e.emissive && t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity), e.map && (t.map.value = e.map), e.alphaMap && (t.alphaMap.value = e.alphaMap), e.specularMap && (t.specularMap.value = e.specularMap), e.envMap && (t.envMap.value = e.envMap, t.flipEnvMap.value = e.envMap && e.envMap.isCubeTexture ? -1 : 1, t.reflectivity.value = e.reflectivity, t.refractionRatio.value = e.refractionRatio), e.lightMap && (t.lightMap.value = e.lightMap, t.lightMapIntensity.value = e.lightMapIntensity), e.aoMap && (t.aoMap.value = e.aoMap, t.aoMapIntensity.value = e.aoMapIntensity);
						var i;
						if (e.map ? i = e.map : e.specularMap ? i = e.specularMap : e.displacementMap ? i = e.displacementMap : e.normalMap ? i = e.normalMap : e.bumpMap ? i = e.bumpMap : e.roughnessMap ? i = e.roughnessMap : e.metalnessMap ? i = e.metalnessMap : e.alphaMap ? i = e.alphaMap : e.emissiveMap && (i = e.emissiveMap), void 0 !== i) {
							if (i.isWebGLRenderTarget && (i = i.texture), !0 === i.matrixAutoUpdate) {
								var n = i.offset,
									r = i.repeat,
									a = i.rotation,
									o = i.center;
								i.matrix.setUvTransform(n.x, n.y, r.x, r.y, a, o.x, o.y)
							}
							t.uvTransform.value.copy(i.matrix)
						}
					}

					function b(t, e) {
						t.specular.value = e.specular, t.shininess.value = Math.max(e.shininess, 1e-4), e.emissiveMap && (t.emissiveMap.value = e.emissiveMap), e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale), e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale)), e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias)
					}

					function x(t, e) {
						t.roughness.value = e.roughness, t.metalness.value = e.metalness, e.roughnessMap && (t.roughnessMap.value = e.roughnessMap), e.metalnessMap && (t.metalnessMap.value = e.metalnessMap), e.emissiveMap && (t.emissiveMap.value = e.emissiveMap), e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale), e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale)), e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias), e.envMap && (t.envMapIntensity.value = e.envMapIntensity)
					}
					console.log("THREE.WebGLRenderer", Xn);
					var _ = void 0 !== (t = t || {}).canvas ? t.canvas : document.createElement("canvas"),
						w = void 0 !== t.context ? t.context : null,
						M = void 0 !== t.alpha && t.alpha,
						T = void 0 === t.depth || t.depth,
						S = void 0 === t.stencil || t.stencil,
						E = void 0 !== t.antialias && t.antialias,
						C = void 0 === t.premultipliedAlpha || t.premultipliedAlpha,
						P = void 0 !== t.preserveDrawingBuffer && t.preserveDrawingBuffer,
						k = [],
						A = [],
						L = null,
						R = [],
						O = [];
					this.domElement = _, this.context = null, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.gammaFactor = 2, this.gammaInput = !1, this.gammaOutput = !1, this.physicallyCorrectLights = !1, this.toneMapping = Nr, this.toneMappingExposure = 1, this.toneMappingWhitePoint = 1, this.maxMorphTargets = 8, this.maxMorphNormals = 4;
					var I = this,
						B = !1,
						U = null,
						D = null,
						z = -1,
						j = "",
						N = null,
						F = null,
						G = new l,
						H = new l,
						V = null,
						X = 0,
						Y = _.width,
						J = _.height,
						Q = 1,
						$ = new l(0, 0, Y, J),
						tt = new l(0, 0, Y, J),
						et = !1,
						ot = new nt,
						st = new function () {
							function t() {
								c.value !== n && (c.value = n, c.needsUpdate = r > 0), i.numPlanes = r, i.numIntersection = 0
							}

							function e(t, e, n, r) {
								var a = null !== t ? t.length : 0,
									o = null;
								if (0 !== a) {
									if (o = c.value, !0 !== r || null === o) {
										var s = n + 4 * a,
											u = e.matrixWorldInverse;
										l.getNormalMatrix(u), (null === o || o.length < s) && (o = new Float32Array(s));
										for (var d = 0, f = n; d !== a; ++d, f += 4) h.copy(t[d]).applyMatrix4(u, l), h.normal.toArray(o, f), o[f + 3] = h.constant
									}
									c.value = o, c.needsUpdate = !0
								}
								return i.numPlanes = a, o
							}
							var i = this,
								n = null,
								r = 0,
								a = !1,
								o = !1,
								h = new it,
								l = new s,
								c = {
									value: null,
									needsUpdate: !1
								};
							this.uniform = c, this.numPlanes = 0, this.numIntersection = 0, this.init = function (t, i, o) {
								var s = 0 !== t.length || i || 0 !== r || a;
								return a = i, n = e(t, o, 0), r = t.length, s
							}, this.beginShadows = function () {
								o = !0, e(null)
							}, this.endShadows = function () {
								o = !1, t()
							}, this.setState = function (i, s, h, l, u, d) {
								if (!a || null === i || 0 === i.length || o && !h) o ? e(null) : t();
								else {
									var f = o ? 0 : r,
										p = 4 * f,
										m = u.clippingState || null;
									c.value = m, m = e(i, l, p, d);
									for (var g = 0; g !== p; ++g) m[g] = n[g];
									u.clippingState = m, this.numIntersection = s ? this.numPlanes : 0, this.numPlanes += f
								}
							}
						},
						ht = !1,
						lt = !1,
						ut = new n,
						dt = new a,
						ft = {
							geometries: 0,
							textures: 0
						},
						pt = {
							frame: 0,
							calls: 0,
							vertices: 0,
							faces: 0,
							points: 0
						};
					this.info = {
						render: pt,
						memory: ft,
						programs: null
					};
					var mt;
					try {
						var gt = {
							alpha: M,
							depth: T,
							stencil: S,
							antialias: E,
							premultipliedAlpha: C,
							preserveDrawingBuffer: P
						};
						if (null === (mt = w || _.getContext("webgl", gt) || _.getContext("experimental-webgl", gt))) throw null !== _.getContext("webgl") ? "Error creating WebGL context with your selected attributes." : "Error creating WebGL context.";
						void 0 === mt.getShaderPrecisionFormat && (mt.getShaderPrecisionFormat = function () {
							return {
								rangeMin: 1,
								rangeMax: 1,
								precision: 1
							}
						}), _.addEventListener("webglcontextlost", r, !1), _.addEventListener("webglcontextrestored", o, !1)
					} catch (t) {
						console.error("THREE.WebGLRenderer: " + t)
					}
					var vt, bt, _t, wt, Mt, Et, Ct, Pt, At, It, Bt, Ut, zt, jt, Ht, Vt, Wt, qt;
					i();
					var Xt = new function (t) {
						function e() {
							if (null !== r && r.isPresenting) {
								var e = r.getEyeParameters("left"),
									n = e.renderWidth,
									a = e.renderHeight;
								p = t.getPixelRatio(), f = t.getSize(), t.setDrawingBufferSize(2 * n, a, 1)
							} else i.enabled && t.setDrawingBufferSize(f.width, f.height, p)
						}
						var i = this,
							r = null,
							a = null;
						"undefined" != typeof window && "VRFrameData" in window && (a = new window.VRFrameData);
						var o = new n,
							s = new n,
							h = new n,
							c = new $t;
						c.bounds = new l(0, 0, .5, 1), c.layers.enable(1);
						var u = new $t;
						u.bounds = new l(.5, 0, .5, 1), u.layers.enable(2);
						var d = new te([c, u]);
						d.layers.enable(1), d.layers.enable(2);
						var f, p;
						"undefined" != typeof window && window.addEventListener("vrdisplaypresentchange", e, !1), this.enabled = !1, this.standing = !1, this.getDevice = function () {
							return r
						}, this.setDevice = function (t) {
							void 0 !== t && (r = t)
						}, this.getCamera = function (t) {
							if (null === r) return t;
							r.depthNear = t.near, r.depthFar = t.far, r.getFrameData(a);
							var e = a.pose;
							null !== e.position ? t.position.fromArray(e.position) : t.position.set(0, 0, 0), null !== e.orientation && t.quaternion.fromArray(e.orientation), t.updateMatrixWorld();
							var i = r.stageParameters;
							if (this.standing && i && (s.fromArray(i.sittingToStandingTransform), h.getInverse(s), t.matrixWorld.multiply(s), t.matrixWorldInverse.multiply(h)), !1 === r.isPresenting) return t;
							c.near = t.near, u.near = t.near, c.far = t.far, u.far = t.far, d.matrixWorld.copy(t.matrixWorld), d.matrixWorldInverse.copy(t.matrixWorldInverse), c.matrixWorldInverse.fromArray(a.leftViewMatrix), u.matrixWorldInverse.fromArray(a.rightViewMatrix), this.standing && i && (c.matrixWorldInverse.multiply(h), u.matrixWorldInverse.multiply(h));
							var n = t.parent;
							null !== n && (o.getInverse(n.matrixWorld), c.matrixWorldInverse.multiply(o), u.matrixWorldInverse.multiply(o)), c.matrixWorld.getInverse(c.matrixWorldInverse), u.matrixWorld.getInverse(u.matrixWorldInverse), c.projectionMatrix.fromArray(a.leftProjectionMatrix), u.projectionMatrix.fromArray(a.rightProjectionMatrix), d.projectionMatrix.copy(c.projectionMatrix);
							var l = r.getLayers();
							if (l.length) {
								var f = l[0];
								null !== f.leftBounds && 4 === f.leftBounds.length && c.bounds.fromArray(f.leftBounds), null !== f.rightBounds && 4 === f.rightBounds.length && u.bounds.fromArray(f.rightBounds)
							}
							return d
						}, this.getStandingMatrix = function () {
							return s
						}, this.submitFrame = function () {
							r && r.isPresenting && r.submitFrame()
						}, this.dispose = function () {
							window.removeEventListener("vrdisplaypresentchange", e)
						}
					}(I);
					this.vr = Xt;
					var Kt = new rt(I, Pt, bt.maxTextureSize);
					this.shadowMap = Kt, this.getContext = function () {
						return mt
					}, this.getContextAttributes = function () {
						return mt.getContextAttributes()
					}, this.forceContextLoss = function () {
						var t = vt.get("WEBGL_lose_context");
						t && t.loseContext()
					}, this.forceContextRestore = function () {
						var t = vt.get("WEBGL_lose_context");
						t && t.restoreContext()
					}, this.getPixelRatio = function () {
						return Q
					}, this.setPixelRatio = function (t) {
						void 0 !== t && (Q = t, this.setSize(Y, J, !1))
					}, this.getSize = function () {
						return {
							width: Y,
							height: J
						}
					}, this.setSize = function (t, e, i) {
						var n = Xt.getDevice();
						n && n.isPresenting ? console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.") : (Y = t, J = e, _.width = t * Q, _.height = e * Q, !1 !== i && (_.style.width = t + "px", _.style.height = e + "px"), this.setViewport(0, 0, t, e))
					}, this.getDrawingBufferSize = function () {
						return {
							width: Y * Q,
							height: J * Q
						}
					}, this.setDrawingBufferSize = function (t, e, i) {
						Y = t, J = e, Q = i, _.width = t * i, _.height = e * i, this.setViewport(0, 0, t, e)
					}, this.setViewport = function (t, e, i, n) {
						$.set(t, J - e - n, i, n), _t.viewport(G.copy($).multiplyScalar(Q))
					}, this.setScissor = function (t, e, i, n) {
						tt.set(t, J - e - n, i, n), _t.scissor(H.copy(tt).multiplyScalar(Q))
					}, this.setScissorTest = function (t) {
						_t.setScissorTest(et = t)
					}, this.getClearColor = function () {
						return Ut.getClearColor()
					}, this.setClearColor = function () {
						Ut.setClearColor.apply(Ut, arguments)
					}, this.getClearAlpha = function () {
						return Ut.getClearAlpha()
					}, this.setClearAlpha = function () {
						Ut.setClearAlpha.apply(Ut, arguments)
					}, this.clear = function (t, e, i) {
						var n = 0;
						(void 0 === t || t) && (n |= mt.COLOR_BUFFER_BIT), (void 0 === e || e) && (n |= mt.DEPTH_BUFFER_BIT), (void 0 === i || i) && (n |= mt.STENCIL_BUFFER_BIT), mt.clear(n)
					}, this.clearColor = function () {
						this.clear(!0, !1, !1)
					}, this.clearDepth = function () {
						this.clear(!1, !0, !1)
					}, this.clearStencil = function () {
						this.clear(!1, !1, !0)
					}, this.clearTarget = function (t, e, i, n) {
						this.setRenderTarget(t), this.clear(e, i, n)
					}, this.dispose = function () {
						_.removeEventListener("webglcontextlost", r, !1), _.removeEventListener("webglcontextrestored", o, !1), Bt.dispose(), Xt.dispose()
					}, this.renderBufferImmediate = function (t, e, i) {
						_t.initAttributes();
						var n = wt.get(t);
						t.hasPositions && !n.position && (n.position = mt.createBuffer()), t.hasNormals && !n.normal && (n.normal = mt.createBuffer()), t.hasUvs && !n.uv && (n.uv = mt.createBuffer()), t.hasColors && !n.color && (n.color = mt.createBuffer());
						var r = e.getAttributes();
						if (t.hasPositions && (mt.bindBuffer(mt.ARRAY_BUFFER, n.position), mt.bufferData(mt.ARRAY_BUFFER, t.positionArray, mt.DYNAMIC_DRAW), _t.enableAttribute(r.position), mt.vertexAttribPointer(r.position, 3, mt.FLOAT, !1, 0, 0)), t.hasNormals) {
							if (mt.bindBuffer(mt.ARRAY_BUFFER, n.normal), !i.isMeshPhongMaterial && !i.isMeshStandardMaterial && !i.isMeshNormalMaterial && !0 === i.flatShading)
								for (var a = 0, o = 3 * t.count; a < o; a += 9) {
									var s = t.normalArray,
										h = (s[a + 0] + s[a + 3] + s[a + 6]) / 3,
										l = (s[a + 1] + s[a + 4] + s[a + 7]) / 3,
										c = (s[a + 2] + s[a + 5] + s[a + 8]) / 3;
									s[a + 0] = h, s[a + 1] = l, s[a + 2] = c, s[a + 3] = h, s[a + 4] = l, s[a + 5] = c, s[a + 6] = h, s[a + 7] = l, s[a + 8] = c
								}
							mt.bufferData(mt.ARRAY_BUFFER, t.normalArray, mt.DYNAMIC_DRAW), _t.enableAttribute(r.normal), mt.vertexAttribPointer(r.normal, 3, mt.FLOAT, !1, 0, 0)
						}
						t.hasUvs && i.map && (mt.bindBuffer(mt.ARRAY_BUFFER, n.uv), mt.bufferData(mt.ARRAY_BUFFER, t.uvArray, mt.DYNAMIC_DRAW), _t.enableAttribute(r.uv), mt.vertexAttribPointer(r.uv, 2, mt.FLOAT, !1, 0, 0)), t.hasColors && i.vertexColors !== nr && (mt.bindBuffer(mt.ARRAY_BUFFER, n.color), mt.bufferData(mt.ARRAY_BUFFER, t.colorArray, mt.DYNAMIC_DRAW), _t.enableAttribute(r.color), mt.vertexAttribPointer(r.color, 3, mt.FLOAT, !1, 0, 0)), _t.disableUnusedAttributes(), mt.drawArrays(mt.TRIANGLES, 0, t.count), t.count = 0
					}, this.renderBufferDirect = function (t, i, n, r, a, o) {
						_t.setMaterial(r);
						var s = v(t, i, r, a),
							h = n.id + "_" + s.id + "_" + (!0 === r.wireframe),
							l = !1;
						h !== j && (j = h, l = !0), a.morphTargetInfluences && (zt.update(a, n, r, s), l = !0);
						var c = n.index,
							u = n.attributes.position,
							d = 1;
						!0 === r.wireframe && (c = Ct.getWireframeAttribute(n), d = 2);
						var f, p = jt;
						null !== c && (f = Et.get(c), (p = Ht).setIndex(f)), l && (! function (t, e, i, n) {
							if (i && i.isInstancedBufferGeometry && null === vt.get("ANGLE_instanced_arrays")) console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
							else {
								void 0 === n && (n = 0), _t.initAttributes();
								var r = i.attributes,
									a = e.getAttributes(),
									o = t.defaultAttributeValues;
								for (var s in a) {
									var h = a[s];
									if (h >= 0) {
										var l = r[s];
										if (void 0 !== l) {
											var c = l.normalized,
												u = l.itemSize,
												d = Et.get(l);
											if (void 0 === d) continue;
											var f = d.buffer,
												p = d.type,
												m = d.bytesPerElement;
											if (l.isInterleavedBufferAttribute) {
												var g = l.data,
													v = g.stride,
													y = l.offset;
												g && g.isInstancedInterleavedBuffer ? (_t.enableAttributeAndDivisor(h, g.meshPerAttribute), void 0 === i.maxInstancedCount && (i.maxInstancedCount = g.meshPerAttribute * g.count)) : _t.enableAttribute(h), mt.bindBuffer(mt.ARRAY_BUFFER, f), mt.vertexAttribPointer(h, u, p, c, v * m, (n * v + y) * m)
											} else l.isInstancedBufferAttribute ? (_t.enableAttributeAndDivisor(h, l.meshPerAttribute), void 0 === i.maxInstancedCount && (i.maxInstancedCount = l.meshPerAttribute * l.count)) : _t.enableAttribute(h), mt.bindBuffer(mt.ARRAY_BUFFER, f), mt.vertexAttribPointer(h, u, p, c, 0, n * u * m)
										} else if (void 0 !== o) {
											var b = o[s];
											if (void 0 !== b) switch (b.length) {
												case 2:
													mt.vertexAttrib2fv(h, b);
													break;
												case 3:
													mt.vertexAttrib3fv(h, b);
													break;
												case 4:
													mt.vertexAttrib4fv(h, b);
													break;
												default:
													mt.vertexAttrib1fv(h, b)
											}
										}
									}
								}
								_t.disableUnusedAttributes()
							}
						}(r, s, n), null !== c && mt.bindBuffer(mt.ELEMENT_ARRAY_BUFFER, f.buffer));
						var m = 0;
						null !== c ? m = c.count : void 0 !== u && (m = u.count);
						var g = n.drawRange.start * d,
							y = n.drawRange.count * d,
							b = null !== o ? o.start * d : 0,
							x = null !== o ? o.count * d : 1 / 0,
							_ = Math.max(g, b),
							w = Math.min(m, g + y, b + x) - 1,
							M = Math.max(0, w - _ + 1);
						if (0 !== M) {
							if (a.isMesh)
								if (!0 === r.wireframe) _t.setLineWidth(r.wireframeLinewidth * e()), p.setMode(mt.LINES);
								else switch (a.drawMode) {
									case Da:
										p.setMode(mt.TRIANGLES);
										break;
									case za:
										p.setMode(mt.TRIANGLE_STRIP);
										break;
									case ja:
										p.setMode(mt.TRIANGLE_FAN)
								} else if (a.isLine) {
									var T = r.linewidth;
									void 0 === T && (T = 1), _t.setLineWidth(T * e()), a.isLineSegments ? p.setMode(mt.LINES) : a.isLineLoop ? p.setMode(mt.LINE_LOOP) : p.setMode(mt.LINE_STRIP)
								} else a.isPoints && p.setMode(mt.POINTS);
							n && n.isInstancedBufferGeometry ? n.maxInstancedCount > 0 && p.renderInstances(n, _, M) : p.render(_, M)
						}
					}, this.compile = function (t, e) {
						k.length = 0, A.length = 0, t.traverse(function (t) {
							t.isLight && (k.push(t), t.castShadow && A.push(t))
						}), At.setup(k, A, e), t.traverse(function (e) {
							if (e.material)
								if (Array.isArray(e.material))
									for (var i = 0; i < e.material.length; i++) g(e.material[i], t.fog, e);
								else g(e.material, t.fog, e)
						})
					};
					var Yt = !1,
						Zt = null;
					this.animate = function (t) {
						Zt = t, Yt || ((Xt.getDevice() || window).requestAnimationFrame(u), Yt = !0)
					}, this.render = function (t, e, i, n) {
						if (e && e.isCamera) {
							if (!B) {
								j = "", z = -1, N = null, !0 === t.autoUpdate && t.updateMatrixWorld(), null === e.parent && e.updateMatrixWorld(), Xt.enabled && (e = Xt.getCamera(e)), ut.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), ot.setFromMatrix(ut), k.length = 0, A.length = 0, R.length = 0, O.length = 0, lt = this.localClippingEnabled, ht = st.init(this.clippingPlanes, lt, e), (L = Bt.get(t, e)).init(), f(t, e, I.sortObjects), !0 === I.sortObjects && L.sort(), ht && st.beginShadows(), Kt.render(A, t, e), At.setup(k, A, e), ht && st.endShadows(), pt.frame++, pt.calls = 0, pt.vertices = 0, pt.faces = 0, pt.points = 0, void 0 === i && (i = null), this.setRenderTarget(i), Ut.render(L, t, e, n);
								var r = L.opaque,
									a = L.transparent;
								if (t.overrideMaterial) {
									var o = t.overrideMaterial;
									r.length && p(r, t, e, o), a.length && p(a, t, e, o)
								} else r.length && p(r, t, e), a.length && p(a, t, e);
								Wt.render(R, t, e), Vt.render(O, t, e, G), i && Mt.updateRenderTargetMipmap(i), _t.buffers.depth.setTest(!0), _t.buffers.depth.setMask(!0), _t.buffers.color.setMask(!0), _t.setPolygonOffset(!1), Xt.enabled && Xt.submitFrame()
							}
						} else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")
					}, this.setFaceCulling = function (t, e) {
						_t.setCullFace(t), _t.setFlipSided(e === Jn)
					}, this.allocTextureUnit = function () {
						var t = X;
						return t >= bt.maxTextures && console.warn("THREE.WebGLRenderer: Trying to use " + t + " texture units while this GPU supports only " + bt.maxTextures), X += 1, t
					}, this.setTexture2D = function () {
						var t = !1;
						return function (e, i) {
							e && e.isWebGLRenderTarget && (t || (console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."), t = !0), e = e.texture), Mt.setTexture2D(e, i)
						}
					}(), this.setTexture = function () {
						var t = !1;
						return function (e, i) {
							t || (console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."), t = !0), Mt.setTexture2D(e, i)
						}
					}(), this.setTextureCube = function () {
						var t = !1;
						return function (e, i) {
							e && e.isWebGLRenderTargetCube && (t || (console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."), t = !0), e = e.texture), e && e.isCubeTexture || Array.isArray(e.image) && 6 === e.image.length ? Mt.setTextureCube(e, i) : Mt.setTextureCubeDynamic(e, i)
						}
					}(), this.getRenderTarget = function () {
						return U
					}, this.setRenderTarget = function (t) {
						U = t, t && void 0 === wt.get(t).__webglFramebuffer && Mt.setupRenderTarget(t);
						var e = null,
							i = !1;
						if (t) {
							var n = wt.get(t).__webglFramebuffer;
							t.isWebGLRenderTargetCube ? (e = n[t.activeCubeFace], i = !0) : e = n, G.copy(t.viewport), H.copy(t.scissor), V = t.scissorTest
						} else G.copy($).multiplyScalar(Q), H.copy(tt).multiplyScalar(Q), V = et;
						if (D !== e && (mt.bindFramebuffer(mt.FRAMEBUFFER, e), D = e), _t.viewport(G), _t.scissor(H), _t.setScissorTest(V), i) {
							var r = wt.get(t.texture);
							mt.framebufferTexture2D(mt.FRAMEBUFFER, mt.COLOR_ATTACHMENT0, mt.TEXTURE_CUBE_MAP_POSITIVE_X + t.activeCubeFace, r.__webglTexture, t.activeMipMapLevel)
						}
					}, this.readRenderTargetPixels = function (t, e, i, n, r, a) {
						if (t && t.isWebGLRenderTarget) {
							var o = wt.get(t).__webglFramebuffer;
							if (o) {
								var s = !1;
								o !== D && (mt.bindFramebuffer(mt.FRAMEBUFFER, o), s = !0);
								try {
									var h = t.texture,
										l = h.format,
										c = h.type;
									if (l !== xa && qt.convert(l) !== mt.getParameter(mt.IMPLEMENTATION_COLOR_READ_FORMAT)) return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
									if (!(c === oa || qt.convert(c) === mt.getParameter(mt.IMPLEMENTATION_COLOR_READ_TYPE) || c === da && (vt.get("OES_texture_float") || vt.get("WEBGL_color_buffer_float")) || c === fa && vt.get("EXT_color_buffer_half_float"))) return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
									mt.checkFramebufferStatus(mt.FRAMEBUFFER) === mt.FRAMEBUFFER_COMPLETE ? e >= 0 && e <= t.width - n && i >= 0 && i <= t.height - r && mt.readPixels(e, i, n, r, qt.convert(l), qt.convert(c), a) : console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")
								} finally {
									s && mt.bindFramebuffer(mt.FRAMEBUFFER, D)
								}
							}
						} else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")
					}
				}

				function ne(t, e) {
					this.name = "", this.color = new q(t), this.density = void 0 !== e ? e : 25e-5
				}

				function re(t, e, i) {
					this.name = "", this.color = new q(t), this.near = void 0 !== e ? e : 1, this.far = void 0 !== i ? i : 1e3
				}

				function ae() {
					ht.call(this), this.type = "Scene", this.background = null, this.fog = null, this.overrideMaterial = null, this.autoUpdate = !0
				}

				function oe(t, e, i, n, r) {
					ht.call(this), this.lensFlares = [], this.positionScreen = new a, this.customUpdateCallback = void 0, void 0 !== t && this.add(t, e, i, n, r)
				}

				function se(t) {
					J.call(this), this.type = "SpriteMaterial", this.color = new q(16777215), this.map = null, this.rotation = 0, this.fog = !1, this.lights = !1, this.setValues(t)
				}

				function he(t) {
					ht.call(this), this.type = "Sprite", this.material = void 0 !== t ? t : new se
				}

				function le() {
					ht.call(this), this.type = "LOD", Object.defineProperties(this, {
						levels: {
							enumerable: !0,
							value: []
						}
					})
				}

				function ce(t, e) {
					if (t = t || [], this.bones = t.slice(0), this.boneMatrices = new Float32Array(16 * this.bones.length), void 0 === e) this.calculateInverses();
					else if (this.bones.length === e.length) this.boneInverses = e.slice(0);
					else {
						console.warn("THREE.Skeleton boneInverses is the wrong length."), this.boneInverses = [];
						for (var i = 0, r = this.bones.length; i < r; i++) this.boneInverses.push(new n)
					}
				}

				function ue() {
					ht.call(this), this.type = "Bone"
				}

				function de(t, e) {
					Dt.call(this, t, e), this.type = "SkinnedMesh", this.bindMode = "attached", this.bindMatrix = new n, this.bindMatrixInverse = new n;
					var i = new ce(this.initBones());
					this.bind(i, this.matrixWorld), this.normalizeSkinWeights()
				}

				function fe(t) {
					J.call(this), this.type = "LineBasicMaterial", this.color = new q(16777215), this.linewidth = 1, this.linecap = "round", this.linejoin = "round", this.lights = !1, this.setValues(t)
				}

				function pe(t, e, i) {
					if (1 === i) return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."), new me(t, e);
					ht.call(this), this.type = "Line", this.geometry = void 0 !== t ? t : new St, this.material = void 0 !== e ? e : new fe({
						color: 16777215 * Math.random()
					})
				}

				function me(t, e) {
					pe.call(this, t, e), this.type = "LineSegments"
				}

				function ge(t, e) {
					pe.call(this, t, e), this.type = "LineLoop"
				}

				function ve(t) {
					J.call(this), this.type = "PointsMaterial", this.color = new q(16777215), this.map = null, this.size = 1, this.sizeAttenuation = !0, this.lights = !1, this.setValues(t)
				}

				function ye(t, e) {
					ht.call(this), this.type = "Points", this.geometry = void 0 !== t ? t : new St, this.material = void 0 !== e ? e : new ve({
						color: 16777215 * Math.random()
					})
				}

				function be() {
					ht.call(this), this.type = "Group"
				}

				function xe(t, e, i, n, r, a, o, s, l) {
					function c() {
						t.readyState >= t.HAVE_CURRENT_DATA && (u.needsUpdate = !0), requestAnimationFrame(c)
					}
					h.call(this, t, e, i, n, r, a, o, s, l), this.generateMipmaps = !1;
					var u = this;
					requestAnimationFrame(c)
				}

				function _e(t, e, i, n, r, a, o, s, l, c, u, d) {
					h.call(this, null, a, o, s, l, c, n, r, u, d), this.image = {
						width: e,
						height: i
					}, this.mipmaps = t, this.flipY = !1, this.generateMipmaps = !1
				}

				function we(t, e, i, n, r, a, o, s, l, c) {
					if ((c = void 0 !== c ? c : Ta) !== Ta && c !== Sa) throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
					void 0 === i && c === Ta && (i = la), void 0 === i && c === Sa && (i = va), h.call(this, null, n, r, a, o, s, c, i, l), this.image = {
						width: t,
						height: e
					}, this.magFilter = void 0 !== o ? o : ta, this.minFilter = void 0 !== s ? s : ta, this.flipY = !1, this.generateMipmaps = !1
				}

				function Me(t, e, i) {
					dt.call(this), this.type = "ParametricGeometry", this.parameters = {
						func: t,
						slices: e,
						stacks: i
					}, this.fromBufferGeometry(new Te(t, e, i)), this.mergeVertices()
				}

				function Te(t, e, i) {
					St.call(this), this.type = "ParametricBufferGeometry", this.parameters = {
						func: t,
						slices: e,
						stacks: i
					};
					var n, r, o = [],
						s = [],
						h = [],
						l = [],
						c = new a,
						u = new a,
						d = new a,
						f = new a,
						p = new a,
						m = e + 1;
					for (n = 0; n <= i; n++) {
						var g = n / i;
						for (r = 0; r <= e; r++) {
							var v = r / e;
							u = t(v, g, u), s.push(u.x, u.y, u.z), v - 1e-5 >= 0 ? (d = t(v - 1e-5, g, d), f.subVectors(u, d)) : (d = t(v + 1e-5, g, d), f.subVectors(d, u)), g - 1e-5 >= 0 ? (d = t(v, g - 1e-5, d), p.subVectors(u, d)) : (d = t(v, g + 1e-5, d), p.subVectors(d, u)), c.crossVectors(f, p).normalize(), h.push(c.x, c.y, c.z), l.push(v, g)
						}
					}
					for (n = 0; n < i; n++)
						for (r = 0; r < e; r++) {
							var y = n * m + r,
								b = n * m + r + 1,
								x = (n + 1) * m + r + 1,
								_ = (n + 1) * m + r;
							o.push(y, b, _), o.push(b, x, _)
						}
					this.setIndex(o), this.addAttribute("position", new _t(s, 3)), this.addAttribute("normal", new _t(h, 3)), this.addAttribute("uv", new _t(l, 2))
				}

				function Se(t, e, i, n) {
					dt.call(this), this.type = "PolyhedronGeometry", this.parameters = {
						vertices: t,
						indices: e,
						radius: i,
						detail: n
					}, this.fromBufferGeometry(new Ee(t, e, i, n)), this.mergeVertices()
				}

				function Ee(t, e, n, r) {
					function o(t) {
						for (var i = new a, n = new a, r = new a, o = 0; o < e.length; o += 3) l(e[o + 0], i), l(e[o + 1], n), l(e[o + 2], r),
							function (t, e, i, n) {
								var r, a, o = Math.pow(2, n),
									s = [];
								for (r = 0; r <= o; r++) {
									s[r] = [];
									var l = t.clone().lerp(i, r / o),
										c = e.clone().lerp(i, r / o),
										u = o - r;
									for (a = 0; a <= u; a++) s[r][a] = 0 === a && r === o ? l : l.clone().lerp(c, a / u)
								}
								for (r = 0; r < o; r++)
									for (a = 0; a < 2 * (o - r) - 1; a++) {
										var d = Math.floor(a / 2);
										a % 2 == 0 ? (h(s[r][d + 1]), h(s[r + 1][d]), h(s[r][d])) : (h(s[r][d + 1]), h(s[r + 1][d + 1]), h(s[r + 1][d]))
									}
							}(i, n, r, t)
					}

					function s() {
						for (var t = new a, e = 0; e < d.length; e += 3) {
							t.x = d[e + 0], t.y = d[e + 1], t.z = d[e + 2];
							var n = u(t) / 2 / Math.PI + .5,
								r = function (t) {
									return Math.atan2(-t.y, Math.sqrt(t.x * t.x + t.z * t.z))
								}(t) / Math.PI + .5;
							f.push(n, 1 - r)
						}! function () {
							for (var t = new a, e = new a, n = new a, r = new a, o = new i, s = new i, h = new i, l = 0, p = 0; l < d.length; l += 9, p += 6) {
								t.set(d[l + 0], d[l + 1], d[l + 2]), e.set(d[l + 3], d[l + 4], d[l + 5]), n.set(d[l + 6], d[l + 7], d[l + 8]), o.set(f[p + 0], f[p + 1]), s.set(f[p + 2], f[p + 3]), h.set(f[p + 4], f[p + 5]), r.copy(t).add(e).add(n).divideScalar(3);
								var m = u(r);
								c(o, p + 0, t, m), c(s, p + 2, e, m), c(h, p + 4, n, m)
							}
						}(),
						function () {
							for (var t = 0; t < f.length; t += 6) {
								var e = f[t + 0],
									i = f[t + 2],
									n = f[t + 4],
									r = Math.max(e, i, n),
									a = Math.min(e, i, n);
								r > .9 && a < .1 && (e < .2 && (f[t + 0] += 1), i < .2 && (f[t + 2] += 1), n < .2 && (f[t + 4] += 1))
							}
						}()
					}

					function h(t) {
						d.push(t.x, t.y, t.z)
					}

					function l(e, i) {
						var n = 3 * e;
						i.x = t[n + 0], i.y = t[n + 1], i.z = t[n + 2]
					}

					function c(t, e, i, n) {
						n < 0 && 1 === t.x && (f[e] = t.x - 1), 0 === i.x && 0 === i.z && (f[e] = n / 2 / Math.PI + .5)
					}

					function u(t) {
						return Math.atan2(t.z, -t.x)
					}
					St.call(this), this.type = "PolyhedronBufferGeometry", this.parameters = {
						vertices: t,
						indices: e,
						radius: n,
						detail: r
					}, n = n || 1;
					var d = [],
						f = [];
					o(r = r || 0),
						function (t) {
							for (var e = new a, i = 0; i < d.length; i += 3) e.x = d[i + 0], e.y = d[i + 1], e.z = d[i + 2], e.normalize().multiplyScalar(t), d[i + 0] = e.x, d[i + 1] = e.y, d[i + 2] = e.z
						}(n), s(), this.addAttribute("position", new _t(d, 3)), this.addAttribute("normal", new _t(d.slice(), 3)), this.addAttribute("uv", new _t(f, 2)), 0 === r ? this.computeVertexNormals() : this.normalizeNormals()
				}

				function Ce(t, e) {
					dt.call(this), this.type = "TetrahedronGeometry", this.parameters = {
						radius: t,
						detail: e
					}, this.fromBufferGeometry(new Pe(t, e)), this.mergeVertices()
				}

				function Pe(t, e) {
					Ee.call(this, [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1], [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1], t, e), this.type = "TetrahedronBufferGeometry", this.parameters = {
						radius: t,
						detail: e
					}
				}

				function ke(t, e) {
					dt.call(this), this.type = "OctahedronGeometry", this.parameters = {
						radius: t,
						detail: e
					}, this.fromBufferGeometry(new Ae(t, e)), this.mergeVertices()
				}

				function Ae(t, e) {
					Ee.call(this, [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1], [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2], t, e), this.type = "OctahedronBufferGeometry", this.parameters = {
						radius: t,
						detail: e
					}
				}

				function Le(t, e) {
					dt.call(this), this.type = "IcosahedronGeometry", this.parameters = {
						radius: t,
						detail: e
					}, this.fromBufferGeometry(new Re(t, e)), this.mergeVertices()
				}

				function Re(t, e) {
					var i = (1 + Math.sqrt(5)) / 2;
					Ee.call(this, [-1, i, 0, 1, i, 0, -1, -i, 0, 1, -i, 0, 0, -1, i, 0, 1, i, 0, -1, -i, 0, 1, -i, i, 0, -1, i, 0, 1, -i, 0, -1, -i, 0, 1], [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1], t, e), this.type = "IcosahedronBufferGeometry", this.parameters = {
						radius: t,
						detail: e
					}
				}

				function Oe(t, e) {
					dt.call(this), this.type = "ExtrudeGeometry", this.parameters = {
						shapes: t,
						options: e
					}, this.fromBufferGeometry(new Ie(t, e)), this.mergeVertices()
				}

				function Ie(t, e) {
					void 0 !== t && (St.call(this), this.type = "ExtrudeBufferGeometry", t = Array.isArray(t) ? t : [t], this.addShapeList(t, e), this.computeVertexNormals())
				}

				function Be(t, e) {
					dt.call(this), this.type = "TextGeometry", this.parameters = {
						text: t,
						parameters: e
					}, this.fromBufferGeometry(new Ue(t, e)), this.mergeVertices()
				}

				function Ue(t, e) {
					var i = (e = e || {}).font;
					if (!i || !i.isFont) return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."), new dt;
					var n = i.generateShapes(t, e.size, e.curveSegments);
					e.amount = void 0 !== e.height ? e.height : 50, void 0 === e.bevelThickness && (e.bevelThickness = 10), void 0 === e.bevelSize && (e.bevelSize = 8), void 0 === e.bevelEnabled && (e.bevelEnabled = !1), Ie.call(this, n, e), this.type = "TextBufferGeometry"
				}

				function De(t, e, i, n, r, a, o) {
					dt.call(this), this.type = "SphereGeometry", this.parameters = {
						radius: t,
						widthSegments: e,
						heightSegments: i,
						phiStart: n,
						phiLength: r,
						thetaStart: a,
						thetaLength: o
					}, this.fromBufferGeometry(new ze(t, e, i, n, r, a, o)), this.mergeVertices()
				}

				function ze(t, e, i, n, r, o, s) {
					St.call(this), this.type = "SphereBufferGeometry", this.parameters = {
						radius: t,
						widthSegments: e,
						heightSegments: i,
						phiStart: n,
						phiLength: r,
						thetaStart: o,
						thetaLength: s
					}, t = t || 1, e = Math.max(3, Math.floor(e) || 8), i = Math.max(2, Math.floor(i) || 6), n = void 0 !== n ? n : 0, r = void 0 !== r ? r : 2 * Math.PI;
					var h, l, c = (o = void 0 !== o ? o : 0) + (s = void 0 !== s ? s : Math.PI),
						u = 0,
						d = [],
						f = new a,
						p = new a,
						m = [],
						g = [],
						v = [],
						y = [];
					for (l = 0; l <= i; l++) {
						var b = [],
							x = l / i;
						for (h = 0; h <= e; h++) {
							var _ = h / e;
							f.x = -t * Math.cos(n + _ * r) * Math.sin(o + x * s), f.y = t * Math.cos(o + x * s), f.z = t * Math.sin(n + _ * r) * Math.sin(o + x * s), g.push(f.x, f.y, f.z), p.set(f.x, f.y, f.z).normalize(), v.push(p.x, p.y, p.z), y.push(_, 1 - x), b.push(u++)
						}
						d.push(b)
					}
					for (l = 0; l < i; l++)
						for (h = 0; h < e; h++) {
							var w = d[l][h + 1],
								M = d[l][h],
								T = d[l + 1][h],
								S = d[l + 1][h + 1];
							(0 !== l || o > 0) && m.push(w, M, S), (l !== i - 1 || c < Math.PI) && m.push(M, T, S)
						}
					this.setIndex(m), this.addAttribute("position", new _t(g, 3)), this.addAttribute("normal", new _t(v, 3)), this.addAttribute("uv", new _t(y, 2))
				}

				function je(t, e, i, n, r, a) {
					dt.call(this), this.type = "RingGeometry", this.parameters = {
						innerRadius: t,
						outerRadius: e,
						thetaSegments: i,
						phiSegments: n,
						thetaStart: r,
						thetaLength: a
					}, this.fromBufferGeometry(new Ne(t, e, i, n, r, a)), this.mergeVertices()
				}

				function Ne(t, e, n, r, o, s) {
					St.call(this), this.type = "RingBufferGeometry", this.parameters = {
						innerRadius: t,
						outerRadius: e,
						thetaSegments: n,
						phiSegments: r,
						thetaStart: o,
						thetaLength: s
					}, t = t || .5, e = e || 1, o = void 0 !== o ? o : 0, s = void 0 !== s ? s : 2 * Math.PI, n = void 0 !== n ? Math.max(3, n) : 8;
					var h, l, c, u = [],
						d = [],
						f = [],
						p = [],
						m = t,
						g = (e - t) / (r = void 0 !== r ? Math.max(1, r) : 1),
						v = new a,
						y = new i;
					for (l = 0; l <= r; l++) {
						for (c = 0; c <= n; c++) h = o + c / n * s, v.x = m * Math.cos(h), v.y = m * Math.sin(h), d.push(v.x, v.y, v.z), f.push(0, 0, 1), y.x = (v.x / e + 1) / 2, y.y = (v.y / e + 1) / 2, p.push(y.x, y.y);
						m += g
					}
					for (l = 0; l < r; l++) {
						var b = l * (n + 1);
						for (c = 0; c < n; c++) {
							var x = h = c + b,
								_ = h + n + 1,
								w = h + n + 2,
								M = h + 1;
							u.push(x, _, M), u.push(_, w, M)
						}
					}
					this.setIndex(u), this.addAttribute("position", new _t(d, 3)), this.addAttribute("normal", new _t(f, 3)), this.addAttribute("uv", new _t(p, 2))
				}

				function Fe(t, e, i, n, r, a, o, s) {
					dt.call(this), this.type = "CylinderGeometry", this.parameters = {
						radiusTop: t,
						radiusBottom: e,
						height: i,
						radialSegments: n,
						heightSegments: r,
						openEnded: a,
						thetaStart: o,
						thetaLength: s
					}, this.fromBufferGeometry(new Ge(t, e, i, n, r, a, o, s)), this.mergeVertices()
				}

				function Ge(t, e, n, r, o, s, h, l) {
					function c(n) {
						var o, s, c, v = new i,
							x = new a,
							_ = 0,
							w = !0 === n ? t : e,
							M = !0 === n ? 1 : -1;
						for (s = g, o = 1; o <= r; o++) f.push(0, y * M, 0), p.push(0, M, 0), m.push(.5, .5), g++;
						for (c = g, o = 0; o <= r; o++) {
							var T = o / r * l + h,
								S = Math.cos(T),
								E = Math.sin(T);
							x.x = w * E, x.y = y * M, x.z = w * S, f.push(x.x, x.y, x.z), p.push(0, M, 0), v.x = .5 * S + .5, v.y = .5 * E * M + .5, m.push(v.x, v.y), g++
						}
						for (o = 0; o < r; o++) {
							var C = s + o,
								P = c + o;
							!0 === n ? d.push(P, P + 1, C) : d.push(P + 1, P, C), _ += 3
						}
						u.addGroup(b, _, !0 === n ? 1 : 2), b += _
					}
					St.call(this), this.type = "CylinderBufferGeometry", this.parameters = {
						radiusTop: t,
						radiusBottom: e,
						height: n,
						radialSegments: r,
						heightSegments: o,
						openEnded: s,
						thetaStart: h,
						thetaLength: l
					};
					var u = this;
					t = void 0 !== t ? t : 1, e = void 0 !== e ? e : 1, n = n || 1, r = Math.floor(r) || 8, o = Math.floor(o) || 1, s = void 0 !== s && s, h = void 0 !== h ? h : 0, l = void 0 !== l ? l : 2 * Math.PI;
					var d = [],
						f = [],
						p = [],
						m = [],
						g = 0,
						v = [],
						y = n / 2,
						b = 0;
					! function () {
						var i, s, c = new a,
							x = new a,
							_ = 0,
							w = (e - t) / n;
						for (s = 0; s <= o; s++) {
							var M = [],
								T = s / o,
								S = T * (e - t) + t;
							for (i = 0; i <= r; i++) {
								var E = i / r,
									C = E * l + h,
									P = Math.sin(C),
									k = Math.cos(C);
								x.x = S * P, x.y = -T * n + y, x.z = S * k, f.push(x.x, x.y, x.z), c.set(P, w, k).normalize(), p.push(c.x, c.y, c.z), m.push(E, 1 - T), M.push(g++)
							}
							v.push(M)
						}
						for (i = 0; i < r; i++)
							for (s = 0; s < o; s++) {
								var A = v[s][i],
									L = v[s + 1][i],
									R = v[s + 1][i + 1],
									O = v[s][i + 1];
								d.push(A, L, O), d.push(L, R, O), _ += 6
							}
						u.addGroup(b, _, 0), b += _
					}(), !1 === s && (t > 0 && c(!0), e > 0 && c(!1)), this.setIndex(d), this.addAttribute("position", new _t(f, 3)), this.addAttribute("normal", new _t(p, 3)), this.addAttribute("uv", new _t(m, 2))
				}

				function He(t, e, i, n, r, a, o) {
					Fe.call(this, 0, t, e, i, n, r, a, o), this.type = "ConeGeometry", this.parameters = {
						radius: t,
						height: e,
						radialSegments: i,
						heightSegments: n,
						openEnded: r,
						thetaStart: a,
						thetaLength: o
					}
				}

				function Ve(t, e, i, n, r, a, o) {
					Ge.call(this, 0, t, e, i, n, r, a, o), this.type = "ConeBufferGeometry", this.parameters = {
						radius: t,
						height: e,
						radialSegments: i,
						heightSegments: n,
						openEnded: r,
						thetaStart: a,
						thetaLength: o
					}
				}

				function We(t, e, i, n) {
					dt.call(this), this.type = "CircleGeometry", this.parameters = {
						radius: t,
						segments: e,
						thetaStart: i,
						thetaLength: n
					}, this.fromBufferGeometry(new qe(t, e, i, n)), this.mergeVertices()
				}

				function qe(t, e, n, r) {
					St.call(this), this.type = "CircleBufferGeometry", this.parameters = {
						radius: t,
						segments: e,
						thetaStart: n,
						thetaLength: r
					}, t = t || 1, e = void 0 !== e ? Math.max(3, e) : 8, n = void 0 !== n ? n : 0, r = void 0 !== r ? r : 2 * Math.PI;
					var o, s, h = [],
						l = [],
						c = [],
						u = [],
						d = new a,
						f = new i;
					for (l.push(0, 0, 0), c.push(0, 0, 1), u.push(.5, .5), s = 0, o = 3; s <= e; s++, o += 3) {
						var p = n + s / e * r;
						d.x = t * Math.cos(p), d.y = t * Math.sin(p), l.push(d.x, d.y, d.z), c.push(0, 0, 1), f.x = (l[o] / t + 1) / 2, f.y = (l[o + 1] / t + 1) / 2, u.push(f.x, f.y)
					}
					for (o = 1; o <= e; o++) h.push(o, o + 1, 0);
					this.setIndex(h), this.addAttribute("position", new _t(l, 3)), this.addAttribute("normal", new _t(c, 3)), this.addAttribute("uv", new _t(u, 2))
				}

				function Xe(t) {
					J.call(this), this.type = "ShadowMaterial", this.color = new q(0), this.opacity = 1, this.lights = !0, this.transparent = !0, this.setValues(t)
				}

				function Ke(t) {
					Ot.call(this, t), this.type = "RawShaderMaterial"
				}

				function Ye(t) {
					J.call(this), this.type = "MeshPhongMaterial", this.color = new q(16777215), this.specular = new q(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new q(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalScale = new i(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = Ur, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t)
				}

				function Ze(t) {
					J.call(this), this.type = "MeshLambertMaterial", this.color = new q(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new q(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = Ur, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t)
				}

				function Je(t) {
					fe.call(this), this.type = "LineDashedMaterial", this.scale = 1, this.dashSize = 3, this.gapSize = 1, this.setValues(t)
				}

				function Qe(t, e, i) {
					var n = this,
						r = !1,
						a = 0,
						o = 0;
					this.onStart = void 0, this.onLoad = t, this.onProgress = e, this.onError = i, this.itemStart = function (t) {
						o++, !1 === r && void 0 !== n.onStart && n.onStart(t, a, o), r = !0
					}, this.itemEnd = function (t) {
						a++, void 0 !== n.onProgress && n.onProgress(t, a, o), a === o && (r = !1, void 0 !== n.onLoad && n.onLoad())
					}, this.itemError = function (t) {
						void 0 !== n.onError && n.onError(t)
					}
				}

				function $e(t) {
					this.manager = void 0 !== t ? t : bo
				}

				function ti(t) {
					this.manager = void 0 !== t ? t : bo, this._parser = null
				}

				function ei(t) {
					this.manager = void 0 !== t ? t : bo, this._parser = null
				}

				function ii(t) {
					this.manager = void 0 !== t ? t : bo
				}

				function ni(t) {
					this.manager = void 0 !== t ? t : bo
				}

				function ri(t) {
					this.manager = void 0 !== t ? t : bo
				}

				function ai(t, e) {
					ht.call(this), this.type = "Light", this.color = new q(t), this.intensity = void 0 !== e ? e : 1, this.receiveShadow = void 0
				}

				function oi(t, e, i) {
					ai.call(this, t, i), this.type = "HemisphereLight", this.castShadow = void 0, this.position.copy(ht.DefaultUp), this.updateMatrix(), this.groundColor = new q(e)
				}

				function si(t) {
					this.camera = t, this.bias = 0, this.radius = 1, this.mapSize = new i(512, 512), this.map = null, this.matrix = new n
				}

				function hi() {
					si.call(this, new $t(50, 1, .5, 500))
				}

				function li(t, e, i, n, r, a) {
					ai.call(this, t, e), this.type = "SpotLight", this.position.copy(ht.DefaultUp), this.updateMatrix(), this.target = new ht, Object.defineProperty(this, "power", {
						get: function () {
							return this.intensity * Math.PI
						},
						set: function (t) {
							this.intensity = t / Math.PI
						}
					}), this.distance = void 0 !== i ? i : 0, this.angle = void 0 !== n ? n : Math.PI / 3, this.penumbra = void 0 !== r ? r : 0, this.decay = void 0 !== a ? a : 1, this.shadow = new hi
				}

				function ci(t, e, i, n) {
					ai.call(this, t, e), this.type = "PointLight", Object.defineProperty(this, "power", {
						get: function () {
							return 4 * this.intensity * Math.PI
						},
						set: function (t) {
							this.intensity = t / (4 * Math.PI)
						}
					}), this.distance = void 0 !== i ? i : 0, this.decay = void 0 !== n ? n : 1, this.shadow = new si(new $t(90, 1, .5, 500))
				}

				function ui() {
					si.call(this, new ct(-5, 5, 5, -5, .5, 500))
				}

				function di(t, e) {
					ai.call(this, t, e), this.type = "DirectionalLight", this.position.copy(ht.DefaultUp), this.updateMatrix(), this.target = new ht, this.shadow = new ui
				}

				function fi(t, e) {
					ai.call(this, t, e), this.type = "AmbientLight", this.castShadow = void 0
				}

				function pi(t, e, i, n) {
					ai.call(this, t, e), this.type = "RectAreaLight", this.position.set(0, 1, 0), this.updateMatrix(), this.width = void 0 !== i ? i : 10, this.height = void 0 !== n ? n : 10
				}

				function mi(t, e, i, n) {
					this.parameterPositions = t, this._cachedIndex = 0, this.resultBuffer = void 0 !== n ? n : new e.constructor(i), this.sampleValues = e, this.valueSize = i
				}

				function gi(t, e, i, n) {
					mi.call(this, t, e, i, n), this._weightPrev = -0, this._offsetPrev = -0, this._weightNext = -0, this._offsetNext = -0
				}

				function vi(t, e, i, n) {
					mi.call(this, t, e, i, n)
				}

				function yi(t, e, i, n) {
					mi.call(this, t, e, i, n)
				}

				function bi(t, e, i, n) {
					if (void 0 === t) throw new Error("track name is undefined");
					if (void 0 === e || 0 === e.length) throw new Error("no keyframes in track named " + t);
					this.name = t, this.times = _o.convertArray(e, this.TimeBufferType), this.values = _o.convertArray(i, this.ValueBufferType), this.setInterpolation(n || this.DefaultInterpolation), this.validate(), this.optimize()
				}

				function xi(t, e, i, n) {
					bi.call(this, t, e, i, n)
				}

				function _i(t, e, i, n) {
					mi.call(this, t, e, i, n)
				}

				function wi(t, e, i, n) {
					bi.call(this, t, e, i, n)
				}

				function Mi(t, e, i, n) {
					bi.call(this, t, e, i, n)
				}

				function Ti(t, e, i, n) {
					bi.call(this, t, e, i, n)
				}

				function Si(t, e, i) {
					bi.call(this, t, e, i)
				}

				function Ei(t, e, i, n) {
					bi.call(this, t, e, i, n)
				}

				function Ci(t, e, i, n) {
					bi.apply(this, t, e, i, n)
				}

				function Pi(t, e, i) {
					this.name = t, this.tracks = i, this.duration = void 0 !== e ? e : -1, this.uuid = Ya.generateUUID(), this.duration < 0 && this.resetDuration(), this.optimize()
				}

				function ki(t) {
					this.manager = void 0 !== t ? t : bo, this.textures = {}
				}

				function Ai(t) {
					this.manager = void 0 !== t ? t : bo
				}

				function Li() {
					this.onLoadStart = function () {}, this.onLoadProgress = function () {}, this.onLoadComplete = function () {}
				}

				function Ri(t) {
					"boolean" == typeof t && (console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."), t = void 0), this.manager = void 0 !== t ? t : bo, this.withCredentials = !1
				}

				function Oi(t) {
					this.manager = void 0 !== t ? t : bo, this.texturePath = ""
				}

				function Ii(t, e, i, n, r) {
					var a = .5 * (n - e),
						o = .5 * (r - i),
						s = t * t;
					return (2 * i - 2 * n + a + o) * (t * s) + (-3 * i + 3 * n - 2 * a - o) * s + a * t + i
				}

				function Bi(t, e, i, n) {
					return function (t, e) {
						var i = 1 - t;
						return i * i * e
					}(t, e) + function (t, e) {
						return 2 * (1 - t) * t * e
					}(t, i) + function (t, e) {
						return t * t * e
					}(t, n)
				}

				function Ui(t, e, i, n, r) {
					return function (t, e) {
						var i = 1 - t;
						return i * i * i * e
					}(t, e) + function (t, e) {
						var i = 1 - t;
						return 3 * i * i * t * e
					}(t, i) + function (t, e) {
						return 3 * (1 - t) * t * t * e
					}(t, n) + function (t, e) {
						return t * t * t * e
					}(t, r)
				}

				function Di() {
					this.arcLengthDivisions = 200
				}

				function zi(t, e) {
					Di.call(this), this.v1 = t, this.v2 = e
				}

				function ji() {
					Di.call(this), this.curves = [], this.autoClose = !1
				}

				function Ni(t, e, i, n, r, a, o, s) {
					Di.call(this), this.aX = t, this.aY = e, this.xRadius = i, this.yRadius = n, this.aStartAngle = r, this.aEndAngle = a, this.aClockwise = o, this.aRotation = s || 0
				}

				function Fi(t) {
					Di.call(this), this.points = void 0 === t ? [] : t
				}

				function Gi(t, e, i, n) {
					Di.call(this), this.v0 = t, this.v1 = e, this.v2 = i, this.v3 = n
				}

				function Hi(t, e, i) {
					Di.call(this), this.v0 = t, this.v1 = e, this.v2 = i
				}

				function Vi(t) {
					ji.call(this), this.currentPoint = new i, t && this.fromPoints(t)
				}

				function Wi() {
					Vi.apply(this, arguments), this.holes = []
				}

				function qi() {
					this.subPaths = [], this.currentPath = null
				}

				function Xi(t) {
					this.data = t
				}

				function Ki(t) {
					this.manager = void 0 !== t ? t : bo
				}

				function Yi(t) {
					this.manager = void 0 !== t ? t : bo
				}

				function Zi() {
					this.type = "StereoCamera", this.aspect = 1, this.eyeSep = .064, this.cameraL = new $t, this.cameraL.layers.enable(1), this.cameraL.matrixAutoUpdate = !1, this.cameraR = new $t, this.cameraR.layers.enable(2), this.cameraR.matrixAutoUpdate = !1
				}

				function Ji() {
					ht.call(this), this.type = "AudioListener", this.context = ko.getContext(), this.gain = this.context.createGain(), this.gain.connect(this.context.destination), this.filter = null
				}

				function Qi(t) {
					ht.call(this), this.type = "Audio", this.context = t.context, this.gain = this.context.createGain(), this.gain.connect(t.getInput()), this.autoplay = !1, this.buffer = null, this.loop = !1, this.startTime = 0, this.offset = 0, this.playbackRate = 1, this.isPlaying = !1, this.hasPlaybackControl = !0, this.sourceType = "empty", this.filters = []
				}

				function $i(t) {
					Qi.call(this, t), this.panner = this.context.createPanner(), this.panner.connect(this.gain)
				}

				function tn(t, e) {
					this.analyser = t.context.createAnalyser(), this.analyser.fftSize = void 0 !== e ? e : 2048, this.data = new Uint8Array(this.analyser.frequencyBinCount), t.getOutput().connect(this.analyser)
				}

				function en(t, e, i) {
					this.binding = t, this.valueSize = i;
					var n, r = Float64Array;
					switch (e) {
						case "quaternion":
							n = this._slerp;
							break;
						case "string":
						case "bool":
							r = Array, n = this._select;
							break;
						default:
							n = this._lerp
					}
					this.buffer = new r(4 * i), this._mixBufferRegion = n, this.cumulativeWeight = 0, this.useCount = 0, this.referenceCount = 0
				}

				function nn(t, e, i) {
					var n = i || rn.parseTrackName(e);
					this._targetGroup = t, this._bindings = t.subscribe_(e, n)
				}

				function rn(t, e, i) {
					this.path = e, this.parsedPath = i || rn.parseTrackName(e), this.node = rn.findNode(t, this.parsedPath.nodeName) || t, this.rootNode = t
				}

				function an() {
					this.uuid = Ya.generateUUID(), this._objects = Array.prototype.slice.call(arguments), this.nCachedObjects_ = 0;
					var t = {};
					this._indicesByUUID = t;
					for (var e = 0, i = arguments.length; e !== i; ++e) t[arguments[e].uuid] = e;
					this._paths = [], this._parsedPaths = [], this._bindings = [], this._bindingsIndicesByPath = {};
					var n = this;
					this.stats = {
						objects: {
							get total() {
								return n._objects.length
							},
							get inUse() {
								return this.total - n.nCachedObjects_
							}
						},
						get bindingsPerObject() {
							return n._bindings.length
						}
					}
				}

				function on(t, e, i) {
					this._mixer = t, this._clip = e, this._localRoot = i || null;
					for (var n = e.tracks, r = n.length, a = new Array(r), o = {
							endingStart: Ua,
							endingEnd: Ua
						}, s = 0; s !== r; ++s) {
						var h = n[s].createInterpolant(null);
						a[s] = h, h.settings = o
					}
					this._interpolantSettings = o, this._interpolants = a, this._propertyBindings = new Array(r), this._cacheIndex = null, this._byClipCacheIndex = null, this._timeScaleInterpolant = null, this._weightInterpolant = null, this.loop = Ba, this._loopCount = -1, this._startTime = null, this.time = 0, this.timeScale = 1, this._effectiveTimeScale = 1, this.weight = 1, this._effectiveWeight = 1, this.repetitions = 1 / 0, this.paused = !1, this.enabled = !0, this.clampWhenFinished = !1, this.zeroSlopeAtStart = !0, this.zeroSlopeAtEnd = !0
				}

				function sn(t) {
					this._root = t, this._initMemoryManager(), this._accuIndex = 0, this.time = 0, this.timeScale = 1
				}

				function hn(t) {
					"string" == typeof t && (console.warn("THREE.Uniform: Type parameter is no longer needed."), t = arguments[1]), this.value = t
				}

				function ln() {
					St.call(this), this.type = "InstancedBufferGeometry", this.maxInstancedCount = void 0
				}

				function cn(t, e, i, n) {
					this.uuid = Ya.generateUUID(), this.data = t, this.itemSize = e, this.offset = i, this.normalized = !0 === n
				}

				function un(t, e) {
					this.uuid = Ya.generateUUID(), this.array = t, this.stride = e, this.count = void 0 !== t ? t.length / e : 0, this.dynamic = !1, this.updateRange = {
						offset: 0,
						count: -1
					}, this.onUploadCallback = function () {}, this.version = 0
				}

				function dn(t, e, i) {
					un.call(this, t, e), this.meshPerAttribute = i || 1
				}

				function fn(t, e, i) {
					ft.call(this, t, e), this.meshPerAttribute = i || 1
				}

				function pn(t, e, i, n) {
					this.ray = new It(t, e), this.near = i || 0, this.far = n || 1 / 0, this.params = {
						Mesh: {},
						Line: {},
						LOD: {},
						Points: {
							threshold: 1
						},
						Sprite: {}
					}, Object.defineProperties(this.params, {
						PointCloud: {
							get: function () {
								return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."), this.Points
							}
						}
					})
				}

				function mn(t, e) {
					return t.distance - e.distance
				}

				function gn(t, e, i, n) {
					if (!1 !== t.visible && (t.raycast(e, i), !0 === n))
						for (var r = t.children, a = 0, o = r.length; a < o; a++) gn(r[a], e, i, !0)
				}

				function vn(t) {
					this.autoStart = void 0 === t || t, this.startTime = 0, this.oldTime = 0, this.elapsedTime = 0, this.running = !1
				}

				function yn(t, e, i) {
					return this.radius = void 0 !== t ? t : 1, this.phi = void 0 !== e ? e : 0, this.theta = void 0 !== i ? i : 0, this
				}

				function bn(t, e, i) {
					return this.radius = void 0 !== t ? t : 1, this.theta = void 0 !== e ? e : 0, this.y = void 0 !== i ? i : 0, this
				}

				function xn(t) {
					ht.call(this), this.material = t, this.render = function () {}
				}

				function _n(t, e, i, n) {
					this.object = t, this.size = void 0 !== e ? e : 1;
					var r = void 0 !== i ? i : 16711680,
						a = void 0 !== n ? n : 1,
						o = 0,
						s = this.object.geometry;
					s && s.isGeometry ? o = 3 * s.faces.length : s && s.isBufferGeometry && (o = s.attributes.normal.count);
					var h = new St,
						l = new _t(2 * o * 3, 3);
					h.addAttribute("position", l), me.call(this, h, new fe({
						color: r,
						linewidth: a
					})), this.matrixAutoUpdate = !1, this.update()
				}

				function wn(t, e) {
					ht.call(this), this.light = t, this.light.updateMatrixWorld(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.color = e;
					for (var i = new St, n = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1], r = 0, a = 1; r < 32; r++, a++) {
						var o = r / 32 * Math.PI * 2,
							s = a / 32 * Math.PI * 2;
						n.push(Math.cos(o), Math.sin(o), 1, Math.cos(s), Math.sin(s), 1)
					}
					i.addAttribute("position", new _t(n, 3));
					var h = new fe({
						fog: !1
					});
					this.cone = new me(i, h), this.add(this.cone), this.update()
				}

				function Mn(t) {
					var e = [];
					t && t.isBone && e.push(t);
					for (var i = 0; i < t.children.length; i++) e.push.apply(e, Mn(t.children[i]));
					return e
				}

				function Tn(t) {
					for (var e = Mn(t), i = new St, n = [], r = [], a = new q(0, 0, 1), o = new q(0, 1, 0), s = 0; s < e.length; s++) {
						var h = e[s];
						h.parent && h.parent.isBone && (n.push(0, 0, 0), n.push(0, 0, 0), r.push(a.r, a.g, a.b), r.push(o.r, o.g, o.b))
					}
					i.addAttribute("position", new _t(n, 3)), i.addAttribute("color", new _t(r, 3));
					var l = new fe({
						vertexColors: ar,
						depthTest: !1,
						depthWrite: !1,
						transparent: !0
					});
					me.call(this, i, l), this.root = t, this.bones = e, this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1
				}

				function Sn(t, e, i) {
					this.light = t, this.light.updateMatrixWorld(), this.color = i;
					var n = new ze(e, 4, 2),
						r = new Rt({
							wireframe: !0,
							fog: !1
						});
					Dt.call(this, n, r), this.matrix = this.light.matrixWorld, this.matrixAutoUpdate = !1, this.update()
				}

				function En(t, e) {
					ht.call(this), this.light = t, this.light.updateMatrixWorld(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.color = e;
					var i = new fe({
							fog: !1
						}),
						n = new St;
					n.addAttribute("position", new ft(new Float32Array(15), 3)), this.line = new pe(n, i), this.add(this.line), this.update()
				}

				function Cn(t, e, i) {
					ht.call(this), this.light = t, this.light.updateMatrixWorld(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.color = i;
					var n = new Ae(e);
					n.rotateY(.5 * Math.PI), this.material = new Rt({
						wireframe: !0,
						fog: !1
					}), void 0 === this.color && (this.material.vertexColors = ar);
					var r = n.getAttribute("position"),
						a = new Float32Array(3 * r.count);
					n.addAttribute("color", new ft(a, 3)), this.add(new Dt(n, this.material)), this.update()
				}

				function Pn(t, e, i, n) {
					t = t || 10, e = e || 10, i = new q(void 0 !== i ? i : 4473924), n = new q(void 0 !== n ? n : 8947848);
					for (var r = e / 2, a = t / e, o = t / 2, s = [], h = [], l = 0, c = 0, u = -o; l <= e; l++, u += a) {
						s.push(-o, 0, u, o, 0, u), s.push(u, 0, -o, u, 0, o);
						var d = l === r ? i : n;
						d.toArray(h, c), c += 3, d.toArray(h, c), c += 3, d.toArray(h, c), c += 3, d.toArray(h, c), c += 3
					}
					var f = new St;
					f.addAttribute("position", new _t(s, 3)), f.addAttribute("color", new _t(h, 3));
					var p = new fe({
						vertexColors: ar
					});
					me.call(this, f, p)
				}

				function kn(t, e, i, n, r, a) {
					t = t || 10, e = e || 16, i = i || 8, n = n || 64, r = new q(void 0 !== r ? r : 4473924), a = new q(void 0 !== a ? a : 8947848);
					var o, s, h, l, c, u, d, f = [],
						p = [];
					for (l = 0; l <= e; l++) h = l / e * (2 * Math.PI), o = Math.sin(h) * t, s = Math.cos(h) * t, f.push(0, 0, 0), f.push(o, 0, s), d = 1 & l ? r : a, p.push(d.r, d.g, d.b), p.push(d.r, d.g, d.b);
					for (l = 0; l <= i; l++)
						for (d = 1 & l ? r : a, u = t - t / i * l, c = 0; c < n; c++) h = c / n * (2 * Math.PI), o = Math.sin(h) * u, s = Math.cos(h) * u, f.push(o, 0, s), p.push(d.r, d.g, d.b), h = (c + 1) / n * (2 * Math.PI), o = Math.sin(h) * u, s = Math.cos(h) * u, f.push(o, 0, s), p.push(d.r, d.g, d.b);
					var m = new St;
					m.addAttribute("position", new _t(f, 3)), m.addAttribute("color", new _t(p, 3));
					var g = new fe({
						vertexColors: ar
					});
					me.call(this, m, g)
				}

				function An(t, e, i, n) {
					this.object = t, this.size = void 0 !== e ? e : 1;
					var r = void 0 !== i ? i : 16776960,
						a = void 0 !== n ? n : 1,
						o = 0,
						s = this.object.geometry;
					s && s.isGeometry ? o = s.faces.length : console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");
					var h = new St,
						l = new _t(2 * o * 3, 3);
					h.addAttribute("position", l), me.call(this, h, new fe({
						color: r,
						linewidth: a
					})), this.matrixAutoUpdate = !1, this.update()
				}

				function Ln(t, e, i) {
					ht.call(this), this.light = t, this.light.updateMatrixWorld(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.color = i, void 0 === e && (e = 1);
					var n = new St;
					n.addAttribute("position", new _t([-e, e, 0, e, e, 0, e, -e, 0, -e, -e, 0, -e, e, 0], 3));
					var r = new fe({
						fog: !1
					});
					this.lightPlane = new pe(n, r), this.add(this.lightPlane), (n = new St).addAttribute("position", new _t([0, 0, 0, 0, 0, 1], 3)), this.targetLine = new pe(n, r), this.add(this.targetLine), this.update()
				}

				function Rn(t) {
					function e(t, e, n) {
						i(t, n), i(e, n)
					}

					function i(t, e) {
						a.push(0, 0, 0), o.push(e.r, e.g, e.b), void 0 === s[t] && (s[t] = []), s[t].push(a.length / 3 - 1)
					}
					var n = new St,
						r = new fe({
							color: 16777215,
							vertexColors: rr
						}),
						a = [],
						o = [],
						s = {},
						h = new q(16755200),
						l = new q(16711680),
						c = new q(43775),
						u = new q(16777215),
						d = new q(3355443);
					e("n1", "n2", h), e("n2", "n4", h), e("n4", "n3", h), e("n3", "n1", h), e("f1", "f2", h), e("f2", "f4", h), e("f4", "f3", h), e("f3", "f1", h), e("n1", "f1", h), e("n2", "f2", h), e("n3", "f3", h), e("n4", "f4", h), e("p", "n1", l), e("p", "n2", l), e("p", "n3", l), e("p", "n4", l), e("u1", "u2", c), e("u2", "u3", c), e("u3", "u1", c), e("c", "t", u), e("p", "c", d), e("cn1", "cn2", d), e("cn3", "cn4", d), e("cf1", "cf2", d), e("cf3", "cf4", d), n.addAttribute("position", new _t(a, 3)), n.addAttribute("color", new _t(o, 3)), me.call(this, n, r), this.camera = t, this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.pointMap = s, this.update()
				}

				function On(t, e) {
					this.object = t, void 0 === e && (e = 16776960);
					var i = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]),
						n = new Float32Array(24),
						r = new St;
					r.setIndex(new ft(i, 1)), r.addAttribute("position", new ft(n, 3)), me.call(this, r, new fe({
						color: e
					})), this.matrixAutoUpdate = !1, this.update()
				}

				function In(t, e) {
					this.type = "Box3Helper", this.box = t;
					var i = void 0 !== e ? e : 16776960,
						n = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]),
						r = new St;
					r.setIndex(new ft(n, 1)), r.addAttribute("position", new _t([1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1], 3)), me.call(this, r, new fe({
						color: i
					})), this.geometry.computeBoundingSphere()
				}

				function Bn(t, e, i) {
					this.type = "PlaneHelper", this.plane = t, this.size = void 0 === e ? 1 : e;
					var n = void 0 !== i ? i : 16776960,
						r = new St;
					r.addAttribute("position", new _t([1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0], 3)), r.computeBoundingSphere(), pe.call(this, r, new fe({
						color: n
					}));
					var a = new St;
					a.addAttribute("position", new _t([1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1], 3)), a.computeBoundingSphere(), this.add(new Dt(a, new Rt({
						color: n,
						opacity: .2,
						transparent: !0,
						depthWrite: !1
					})))
				}

				function Un(t, e, i, n, r, a) {
					ht.call(this), void 0 === n && (n = 16776960), void 0 === i && (i = 1), void 0 === r && (r = .2 * i), void 0 === a && (a = .2 * r), void 0 === Ao && ((Ao = new St).addAttribute("position", new _t([0, 0, 0, 0, 1, 0], 3)), (Lo = new Ge(0, .5, 1, 5, 1)).translate(0, -.5, 0)), this.position.copy(e), this.line = new pe(Ao, new fe({
						color: n
					})), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new Dt(Lo, new Rt({
						color: n
					})), this.cone.matrixAutoUpdate = !1, this.add(this.cone), this.setDirection(t), this.setLength(i, r, a)
				}

				function Dn(t) {
					var e = [0, 0, 0, t = t || 1, 0, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, 0, t],
						i = new St;
					i.addAttribute("position", new _t(e, 3)), i.addAttribute("color", new _t([1, 0, 0, 1, .6, 0, 0, 1, 0, .6, 1, 0, 0, 0, 1, 0, .6, 1], 3));
					var n = new fe({
						vertexColors: ar
					});
					me.call(this, i, n)
				}

				function zn() {
					function t(t, a, o, s) {
						e = t, i = o, n = -3 * t + 3 * a - 2 * o - s, r = 2 * t - 2 * a + o + s
					}
					var e = 0,
						i = 0,
						n = 0,
						r = 0;
					return {
						initCatmullRom: function (e, i, n, r, a) {
							t(i, n, a * (n - e), a * (r - i))
						},
						initNonuniformCatmullRom: function (e, i, n, r, a, o, s) {
							var h = (i - e) / a - (n - e) / (a + o) + (n - i) / o,
								l = (n - i) / o - (r - i) / (o + s) + (r - n) / s;
							t(i, n, h *= o, l *= o)
						},
						calc: function (t) {
							var a = t * t;
							return e + i * t + n * a + r * (a * t)
						}
					}
				}

				function jn(t) {
					Di.call(this), t.length < 2 && console.warn("THREE.CatmullRomCurve3: Points array needs at least two entries."), this.points = t || [], this.closed = !1
				}

				function Nn(t, e, i, n) {
					Di.call(this), this.v0 = t, this.v1 = e, this.v2 = i, this.v3 = n
				}

				function Fn(t, e, i) {
					Di.call(this), this.v0 = t, this.v1 = e, this.v2 = i
				}

				function Gn(t, e) {
					Di.call(this), this.v1 = t, this.v2 = e
				}

				function Hn(t, e, i, n, r, a) {
					Ni.call(this, t, e, i, i, n, r, a)
				}

				function Vn(t) {
					console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."), jn.call(this, t), this.type = "catmullrom", this.closed = !0
				}

				function Wn(t) {
					console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."), jn.call(this, t), this.type = "catmullrom"
				}

				function qn(t) {
					console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."), jn.call(this, t), this.type = "catmullrom"
				}
				void 0 === Number.EPSILON && (Number.EPSILON = Math.pow(2, -52)), void 0 === Number.isInteger && (Number.isInteger = function (t) {
					return "number" == typeof t && isFinite(t) && Math.floor(t) === t
				}), void 0 === Math.sign && (Math.sign = function (t) {
					return t < 0 ? -1 : t > 0 ? 1 : +t
				}), "name" in Function.prototype == !1 && Object.defineProperty(Function.prototype, "name", {
					get: function () {
						return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]
					}
				}), void 0 === Object.assign && (Object.assign = function (t) {
					if (void 0 === t || null === t) throw new TypeError("Cannot convert undefined or null to object");
					for (var e = Object(t), i = 1; i < arguments.length; i++) {
						var n = arguments[i];
						if (void 0 !== n && null !== n)
							for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
					}
					return e
				}), Object.assign(e.prototype, {
					addEventListener: function (t, e) {
						void 0 === this._listeners && (this._listeners = {});
						var i = this._listeners;
						void 0 === i[t] && (i[t] = []), -1 === i[t].indexOf(e) && i[t].push(e)
					},
					hasEventListener: function (t, e) {
						if (void 0 === this._listeners) return !1;
						var i = this._listeners;
						return void 0 !== i[t] && -1 !== i[t].indexOf(e)
					},
					removeEventListener: function (t, e) {
						if (void 0 !== this._listeners) {
							var i = this._listeners[t];
							if (void 0 !== i) {
								var n = i.indexOf(e); - 1 !== n && i.splice(n, 1)
							}
						}
					},
					dispatchEvent: function (t) {
						if (void 0 !== this._listeners) {
							var e = this._listeners[t.type];
							if (void 0 !== e) {
								t.target = this;
								for (var i = e.slice(0), n = 0, r = i.length; n < r; n++) i[n].call(this, t)
							}
						}
					}
				});
				var Xn = "88dev",
					Kn = 0,
					Yn = 1,
					Zn = 2,
					Jn = 0,
					Qn = 1,
					$n = 2,
					tr = 0,
					er = 1,
					ir = 2,
					nr = 0,
					rr = 1,
					ar = 2,
					or = 0,
					sr = 1,
					hr = 2,
					lr = 3,
					cr = 4,
					ur = 5,
					dr = 100,
					fr = 101,
					pr = 102,
					mr = 103,
					gr = 104,
					vr = 200,
					yr = 201,
					br = 202,
					xr = 203,
					_r = 204,
					wr = 205,
					Mr = 206,
					Tr = 207,
					Sr = 208,
					Er = 209,
					Cr = 210,
					Pr = 0,
					kr = 1,
					Ar = 2,
					Lr = 3,
					Rr = 4,
					Or = 5,
					Ir = 6,
					Br = 7,
					Ur = 0,
					Dr = 1,
					zr = 2,
					jr = 0,
					Nr = 1,
					Fr = 2,
					Gr = 3,
					Hr = 4,
					Vr = 301,
					Wr = 302,
					qr = 303,
					Xr = 304,
					Kr = 305,
					Yr = 306,
					Zr = 307,
					Jr = 1e3,
					Qr = 1001,
					$r = 1002,
					ta = 1003,
					ea = 1004,
					ia = 1005,
					na = 1006,
					ra = 1007,
					aa = 1008,
					oa = 1009,
					sa = 1010,
					ha = 1011,
					la = 1012,
					ca = 1013,
					ua = 1014,
					da = 1015,
					fa = 1016,
					pa = 1017,
					ma = 1018,
					ga = 1019,
					va = 1020,
					ya = 1021,
					ba = 1022,
					xa = 1023,
					_a = 1024,
					wa = 1025,
					Ma = xa,
					Ta = 1026,
					Sa = 1027,
					Ea = 2001,
					Ca = 2002,
					Pa = 2003,
					ka = 2004,
					Aa = 2100,
					La = 2101,
					Ra = 2102,
					Oa = 2103,
					Ia = 2151,
					Ba = 2201,
					Ua = 2400,
					Da = 0,
					za = 1,
					ja = 2,
					Na = 3e3,
					Fa = 3001,
					Ga = 3007,
					Ha = 3002,
					Va = 3004,
					Wa = 3005,
					qa = 3006,
					Xa = 3200,
					Ka = 3201,
					Ya = {
						DEG2RAD: Math.PI / 180,
						RAD2DEG: 180 / Math.PI,
						generateUUID: function () {
							var t, e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),
								i = new Array(36),
								n = 0;
							return function () {
								for (var r = 0; r < 36; r++) 8 === r || 13 === r || 18 === r || 23 === r ? i[r] = "-" : 14 === r ? i[r] = "4" : (n <= 2 && (n = 33554432 + 16777216 * Math.random() | 0), t = 15 & n, n >>= 4, i[r] = e[19 === r ? 3 & t | 8 : t]);
								return i.join("")
							}
						}(),
						clamp: function (t, e, i) {
							return Math.max(e, Math.min(i, t))
						},
						euclideanModulo: function (t, e) {
							return (t % e + e) % e
						},
						mapLinear: function (t, e, i, n, r) {
							return n + (t - e) * (r - n) / (i - e)
						},
						lerp: function (t, e, i) {
							return (1 - i) * t + i * e
						},
						smoothstep: function (t, e, i) {
							return t <= e ? 0 : t >= i ? 1 : (t = (t - e) / (i - e)) * t * (3 - 2 * t)
						},
						smootherstep: function (t, e, i) {
							return t <= e ? 0 : t >= i ? 1 : (t = (t - e) / (i - e)) * t * t * (t * (6 * t - 15) + 10)
						},
						randInt: function (t, e) {
							return t + Math.floor(Math.random() * (e - t + 1))
						},
						randFloat: function (t, e) {
							return t + Math.random() * (e - t)
						},
						randFloatSpread: function (t) {
							return t * (.5 - Math.random())
						},
						degToRad: function (t) {
							return t * Ya.DEG2RAD
						},
						radToDeg: function (t) {
							return t * Ya.RAD2DEG
						},
						isPowerOfTwo: function (t) {
							return 0 == (t & t - 1) && 0 !== t
						},
						ceilPowerOfTwo: function (t) {
							return Math.pow(2, Math.ceil(Math.log(t) / Math.LN2))
						},
						floorPowerOfTwo: function (t) {
							return Math.pow(2, Math.floor(Math.log(t) / Math.LN2))
						}
					};
				Object.defineProperties(i.prototype, {
					width: {
						get: function () {
							return this.x
						},
						set: function (t) {
							this.x = t
						}
					},
					height: {
						get: function () {
							return this.y
						},
						set: function (t) {
							this.y = t
						}
					}
				}), Object.assign(i.prototype, {
					isVector2: !0,
					set: function (t, e) {
						return this.x = t, this.y = e, this
					},
					setScalar: function (t) {
						return this.x = t, this.y = t, this
					},
					setX: function (t) {
						return this.x = t, this
					},
					setY: function (t) {
						return this.y = t, this
					},
					setComponent: function (t, e) {
						switch (t) {
							case 0:
								this.x = e;
								break;
							case 1:
								this.y = e;
								break;
							default:
								throw new Error("index is out of range: " + t)
						}
						return this
					},
					getComponent: function (t) {
						switch (t) {
							case 0:
								return this.x;
							case 1:
								return this.y;
							default:
								throw new Error("index is out of range: " + t)
						}
					},
					clone: function () {
						return new this.constructor(this.x, this.y)
					},
					copy: function (t) {
						return this.x = t.x, this.y = t.y, this
					},
					add: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(t, e)) : (this.x += t.x, this.y += t.y, this)
					},
					addScalar: function (t) {
						return this.x += t, this.y += t, this
					},
					addVectors: function (t, e) {
						return this.x = t.x + e.x, this.y = t.y + e.y, this
					},
					addScaledVector: function (t, e) {
						return this.x += t.x * e, this.y += t.y * e, this
					},
					sub: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(t, e)) : (this.x -= t.x, this.y -= t.y, this)
					},
					subScalar: function (t) {
						return this.x -= t, this.y -= t, this
					},
					subVectors: function (t, e) {
						return this.x = t.x - e.x, this.y = t.y - e.y, this
					},
					multiply: function (t) {
						return this.x *= t.x, this.y *= t.y, this
					},
					multiplyScalar: function (t) {
						return this.x *= t, this.y *= t, this
					},
					divide: function (t) {
						return this.x /= t.x, this.y /= t.y, this
					},
					divideScalar: function (t) {
						return this.multiplyScalar(1 / t)
					},
					applyMatrix3: function (t) {
						var e = this.x,
							i = this.y,
							n = t.elements;
						return this.x = n[0] * e + n[3] * i + n[6], this.y = n[1] * e + n[4] * i + n[7], this
					},
					min: function (t) {
						return this.x = Math.min(this.x, t.x), this.y = Math.min(this.y, t.y), this
					},
					max: function (t) {
						return this.x = Math.max(this.x, t.x), this.y = Math.max(this.y, t.y), this
					},
					clamp: function (t, e) {
						return this.x = Math.max(t.x, Math.min(e.x, this.x)), this.y = Math.max(t.y, Math.min(e.y, this.y)), this
					},
					clampScalar: function () {
						var t = new i,
							e = new i;
						return function (i, n) {
							return t.set(i, i), e.set(n, n), this.clamp(t, e)
						}
					}(),
					clampLength: function (t, e) {
						var i = this.length();
						return this.divideScalar(i || 1).multiplyScalar(Math.max(t, Math.min(e, i)))
					},
					floor: function () {
						return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this
					},
					ceil: function () {
						return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this
					},
					round: function () {
						return this.x = Math.round(this.x), this.y = Math.round(this.y), this
					},
					roundToZero: function () {
						return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this
					},
					negate: function () {
						return this.x = -this.x, this.y = -this.y, this
					},
					dot: function (t) {
						return this.x * t.x + this.y * t.y
					},
					lengthSq: function () {
						return this.x * this.x + this.y * this.y
					},
					length: function () {
						return Math.sqrt(this.x * this.x + this.y * this.y)
					},
					manhattanLength: function () {
						return Math.abs(this.x) + Math.abs(this.y)
					},
					normalize: function () {
						return this.divideScalar(this.length() || 1)
					},
					angle: function () {
						var t = Math.atan2(this.y, this.x);
						return t < 0 && (t += 2 * Math.PI), t
					},
					distanceTo: function (t) {
						return Math.sqrt(this.distanceToSquared(t))
					},
					distanceToSquared: function (t) {
						var e = this.x - t.x,
							i = this.y - t.y;
						return e * e + i * i
					},
					manhattanDistanceTo: function (t) {
						return Math.abs(this.x - t.x) + Math.abs(this.y - t.y)
					},
					setLength: function (t) {
						return this.normalize().multiplyScalar(t)
					},
					lerp: function (t, e) {
						return this.x += (t.x - this.x) * e, this.y += (t.y - this.y) * e, this
					},
					lerpVectors: function (t, e, i) {
						return this.subVectors(e, t).multiplyScalar(i).add(t)
					},
					equals: function (t) {
						return t.x === this.x && t.y === this.y
					},
					fromArray: function (t, e) {
						return void 0 === e && (e = 0), this.x = t[e], this.y = t[e + 1], this
					},
					toArray: function (t, e) {
						return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this.x, t[e + 1] = this.y, t
					},
					fromBufferAttribute: function (t, e, i) {
						return void 0 !== i && console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."), this.x = t.getX(e), this.y = t.getY(e), this
					},
					rotateAround: function (t, e) {
						var i = Math.cos(e),
							n = Math.sin(e),
							r = this.x - t.x,
							a = this.y - t.y;
						return this.x = r * i - a * n + t.x, this.y = r * n + a * i + t.y, this
					}
				}), Object.assign(n.prototype, {
					isMatrix4: !0,
					set: function (t, e, i, n, r, a, o, s, h, l, c, u, d, f, p, m) {
						var g = this.elements;
						return g[0] = t, g[4] = e, g[8] = i, g[12] = n, g[1] = r, g[5] = a, g[9] = o, g[13] = s, g[2] = h, g[6] = l, g[10] = c, g[14] = u, g[3] = d, g[7] = f, g[11] = p, g[15] = m, this
					},
					identity: function () {
						return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this
					},
					clone: function () {
						return (new n).fromArray(this.elements)
					},
					copy: function (t) {
						var e = this.elements,
							i = t.elements;
						return e[0] = i[0], e[1] = i[1], e[2] = i[2], e[3] = i[3], e[4] = i[4], e[5] = i[5], e[6] = i[6], e[7] = i[7], e[8] = i[8], e[9] = i[9], e[10] = i[10], e[11] = i[11], e[12] = i[12], e[13] = i[13], e[14] = i[14], e[15] = i[15], this
					},
					copyPosition: function (t) {
						var e = this.elements,
							i = t.elements;
						return e[12] = i[12], e[13] = i[13], e[14] = i[14], this
					},
					extractBasis: function (t, e, i) {
						return t.setFromMatrixColumn(this, 0), e.setFromMatrixColumn(this, 1), i.setFromMatrixColumn(this, 2), this
					},
					makeBasis: function (t, e, i) {
						return this.set(t.x, e.x, i.x, 0, t.y, e.y, i.y, 0, t.z, e.z, i.z, 0, 0, 0, 0, 1), this
					},
					extractRotation: function () {
						var t = new a;
						return function (e) {
							var i = this.elements,
								n = e.elements,
								r = 1 / t.setFromMatrixColumn(e, 0).length(),
								a = 1 / t.setFromMatrixColumn(e, 1).length(),
								o = 1 / t.setFromMatrixColumn(e, 2).length();
							return i[0] = n[0] * r, i[1] = n[1] * r, i[2] = n[2] * r, i[4] = n[4] * a, i[5] = n[5] * a, i[6] = n[6] * a, i[8] = n[8] * o, i[9] = n[9] * o, i[10] = n[10] * o, this
						}
					}(),
					makeRotationFromEuler: function (t) {
						t && t.isEuler || console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");
						var e = this.elements,
							i = t.x,
							n = t.y,
							r = t.z,
							a = Math.cos(i),
							o = Math.sin(i),
							s = Math.cos(n),
							h = Math.sin(n),
							l = Math.cos(r),
							c = Math.sin(r);
						if ("XYZ" === t.order) {
							var u = a * l,
								d = a * c,
								f = o * l,
								p = o * c;
							e[0] = s * l, e[4] = -s * c, e[8] = h, e[1] = d + f * h, e[5] = u - p * h, e[9] = -o * s, e[2] = p - u * h, e[6] = f + d * h, e[10] = a * s
						} else if ("YXZ" === t.order) {
							var m = s * l,
								g = s * c,
								v = h * l,
								y = h * c;
							e[0] = m + y * o, e[4] = v * o - g, e[8] = a * h, e[1] = a * c, e[5] = a * l, e[9] = -o, e[2] = g * o - v, e[6] = y + m * o, e[10] = a * s
						} else if ("ZXY" === t.order) {
							var m = s * l,
								g = s * c,
								v = h * l,
								y = h * c;
							e[0] = m - y * o, e[4] = -a * c, e[8] = v + g * o, e[1] = g + v * o, e[5] = a * l, e[9] = y - m * o, e[2] = -a * h, e[6] = o, e[10] = a * s
						} else if ("ZYX" === t.order) {
							var u = a * l,
								d = a * c,
								f = o * l,
								p = o * c;
							e[0] = s * l, e[4] = f * h - d, e[8] = u * h + p, e[1] = s * c, e[5] = p * h + u, e[9] = d * h - f, e[2] = -h, e[6] = o * s, e[10] = a * s
						} else if ("YZX" === t.order) {
							var b = a * s,
								x = a * h,
								_ = o * s,
								w = o * h;
							e[0] = s * l, e[4] = w - b * c, e[8] = _ * c + x, e[1] = c, e[5] = a * l, e[9] = -o * l, e[2] = -h * l, e[6] = x * c + _, e[10] = b - w * c
						} else if ("XZY" === t.order) {
							var b = a * s,
								x = a * h,
								_ = o * s,
								w = o * h;
							e[0] = s * l, e[4] = -c, e[8] = h * l, e[1] = b * c + w, e[5] = a * l, e[9] = x * c - _, e[2] = _ * c - x, e[6] = o * l, e[10] = w * c + b
						}
						return e[3] = 0, e[7] = 0, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this
					},
					makeRotationFromQuaternion: function (t) {
						var e = this.elements,
							i = t._x,
							n = t._y,
							r = t._z,
							a = t._w,
							o = i + i,
							s = n + n,
							h = r + r,
							l = i * o,
							c = i * s,
							u = i * h,
							d = n * s,
							f = n * h,
							p = r * h,
							m = a * o,
							g = a * s,
							v = a * h;
						return e[0] = 1 - (d + p), e[4] = c - v, e[8] = u + g, e[1] = c + v, e[5] = 1 - (l + p), e[9] = f - m, e[2] = u - g, e[6] = f + m, e[10] = 1 - (l + d), e[3] = 0, e[7] = 0, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this
					},
					lookAt: function () {
						var t = new a,
							e = new a,
							i = new a;
						return function (n, r, a) {
							var o = this.elements;
							return i.subVectors(n, r), 0 === i.lengthSq() && (i.z = 1), i.normalize(), t.crossVectors(a, i), 0 === t.lengthSq() && (1 === Math.abs(a.z) ? i.x += 1e-4 : i.z += 1e-4, i.normalize(), t.crossVectors(a, i)), t.normalize(), e.crossVectors(i, t), o[0] = t.x, o[4] = e.x, o[8] = i.x, o[1] = t.y, o[5] = e.y, o[9] = i.y, o[2] = t.z, o[6] = e.z, o[10] = i.z, this
						}
					}(),
					multiply: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), this.multiplyMatrices(t, e)) : this.multiplyMatrices(this, t)
					},
					premultiply: function (t) {
						return this.multiplyMatrices(t, this)
					},
					multiplyMatrices: function (t, e) {
						var i = t.elements,
							n = e.elements,
							r = this.elements,
							a = i[0],
							o = i[4],
							s = i[8],
							h = i[12],
							l = i[1],
							c = i[5],
							u = i[9],
							d = i[13],
							f = i[2],
							p = i[6],
							m = i[10],
							g = i[14],
							v = i[3],
							y = i[7],
							b = i[11],
							x = i[15],
							_ = n[0],
							w = n[4],
							M = n[8],
							T = n[12],
							S = n[1],
							E = n[5],
							C = n[9],
							P = n[13],
							k = n[2],
							A = n[6],
							L = n[10],
							R = n[14],
							O = n[3],
							I = n[7],
							B = n[11],
							U = n[15];
						return r[0] = a * _ + o * S + s * k + h * O, r[4] = a * w + o * E + s * A + h * I, r[8] = a * M + o * C + s * L + h * B, r[12] = a * T + o * P + s * R + h * U, r[1] = l * _ + c * S + u * k + d * O, r[5] = l * w + c * E + u * A + d * I, r[9] = l * M + c * C + u * L + d * B, r[13] = l * T + c * P + u * R + d * U, r[2] = f * _ + p * S + m * k + g * O, r[6] = f * w + p * E + m * A + g * I, r[10] = f * M + p * C + m * L + g * B, r[14] = f * T + p * P + m * R + g * U, r[3] = v * _ + y * S + b * k + x * O, r[7] = v * w + y * E + b * A + x * I, r[11] = v * M + y * C + b * L + x * B, r[15] = v * T + y * P + b * R + x * U, this
					},
					multiplyScalar: function (t) {
						var e = this.elements;
						return e[0] *= t, e[4] *= t, e[8] *= t, e[12] *= t, e[1] *= t, e[5] *= t, e[9] *= t, e[13] *= t, e[2] *= t, e[6] *= t, e[10] *= t, e[14] *= t, e[3] *= t, e[7] *= t, e[11] *= t, e[15] *= t, this
					},
					applyToBufferAttribute: function () {
						var t = new a;
						return function (e) {
							for (var i = 0, n = e.count; i < n; i++) t.x = e.getX(i), t.y = e.getY(i), t.z = e.getZ(i), t.applyMatrix4(this), e.setXYZ(i, t.x, t.y, t.z);
							return e
						}
					}(),
					determinant: function () {
						var t = this.elements,
							e = t[0],
							i = t[4],
							n = t[8],
							r = t[12],
							a = t[1],
							o = t[5],
							s = t[9],
							h = t[13],
							l = t[2],
							c = t[6],
							u = t[10],
							d = t[14];
						return t[3] * (+r * s * c - n * h * c - r * o * u + i * h * u + n * o * d - i * s * d) + t[7] * (+e * s * d - e * h * u + r * a * u - n * a * d + n * h * l - r * s * l) + t[11] * (+e * h * c - e * o * d - r * a * c + i * a * d + r * o * l - i * h * l) + t[15] * (-n * o * l - e * s * c + e * o * u + n * a * c - i * a * u + i * s * l)
					},
					transpose: function () {
						var t, e = this.elements;
						return t = e[1], e[1] = e[4], e[4] = t, t = e[2], e[2] = e[8], e[8] = t, t = e[6], e[6] = e[9], e[9] = t, t = e[3], e[3] = e[12], e[12] = t, t = e[7], e[7] = e[13], e[13] = t, t = e[11], e[11] = e[14], e[14] = t, this
					},
					setPosition: function (t) {
						var e = this.elements;
						return e[12] = t.x, e[13] = t.y, e[14] = t.z, this
					},
					getInverse: function (t, e) {
						var i = this.elements,
							n = t.elements,
							r = n[0],
							a = n[1],
							o = n[2],
							s = n[3],
							h = n[4],
							l = n[5],
							c = n[6],
							u = n[7],
							d = n[8],
							f = n[9],
							p = n[10],
							m = n[11],
							g = n[12],
							v = n[13],
							y = n[14],
							b = n[15],
							x = f * y * u - v * p * u + v * c * m - l * y * m - f * c * b + l * p * b,
							_ = g * p * u - d * y * u - g * c * m + h * y * m + d * c * b - h * p * b,
							w = d * v * u - g * f * u + g * l * m - h * v * m - d * l * b + h * f * b,
							M = g * f * c - d * v * c - g * l * p + h * v * p + d * l * y - h * f * y,
							T = r * x + a * _ + o * w + s * M;
						if (0 === T) {
							var S = "THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";
							if (!0 === e) throw new Error(S);
							return console.warn(S), this.identity()
						}
						var E = 1 / T;
						return i[0] = x * E, i[1] = (v * p * s - f * y * s - v * o * m + a * y * m + f * o * b - a * p * b) * E, i[2] = (l * y * s - v * c * s + v * o * u - a * y * u - l * o * b + a * c * b) * E, i[3] = (f * c * s - l * p * s - f * o * u + a * p * u + l * o * m - a * c * m) * E, i[4] = _ * E, i[5] = (d * y * s - g * p * s + g * o * m - r * y * m - d * o * b + r * p * b) * E, i[6] = (g * c * s - h * y * s - g * o * u + r * y * u + h * o * b - r * c * b) * E, i[7] = (h * p * s - d * c * s + d * o * u - r * p * u - h * o * m + r * c * m) * E, i[8] = w * E, i[9] = (g * f * s - d * v * s - g * a * m + r * v * m + d * a * b - r * f * b) * E, i[10] = (h * v * s - g * l * s + g * a * u - r * v * u - h * a * b + r * l * b) * E, i[11] = (d * l * s - h * f * s - d * a * u + r * f * u + h * a * m - r * l * m) * E, i[12] = M * E, i[13] = (d * v * o - g * f * o + g * a * p - r * v * p - d * a * y + r * f * y) * E, i[14] = (g * l * o - h * v * o - g * a * c + r * v * c + h * a * y - r * l * y) * E, i[15] = (h * f * o - d * l * o + d * a * c - r * f * c - h * a * p + r * l * p) * E, this
					},
					scale: function (t) {
						var e = this.elements,
							i = t.x,
							n = t.y,
							r = t.z;
						return e[0] *= i, e[4] *= n, e[8] *= r, e[1] *= i, e[5] *= n, e[9] *= r, e[2] *= i, e[6] *= n, e[10] *= r, e[3] *= i, e[7] *= n, e[11] *= r, this
					},
					getMaxScaleOnAxis: function () {
						var t = this.elements,
							e = t[0] * t[0] + t[1] * t[1] + t[2] * t[2],
							i = t[4] * t[4] + t[5] * t[5] + t[6] * t[6],
							n = t[8] * t[8] + t[9] * t[9] + t[10] * t[10];
						return Math.sqrt(Math.max(e, i, n))
					},
					makeTranslation: function (t, e, i) {
						return this.set(1, 0, 0, t, 0, 1, 0, e, 0, 0, 1, i, 0, 0, 0, 1), this
					},
					makeRotationX: function (t) {
						var e = Math.cos(t),
							i = Math.sin(t);
						return this.set(1, 0, 0, 0, 0, e, -i, 0, 0, i, e, 0, 0, 0, 0, 1), this
					},
					makeRotationY: function (t) {
						var e = Math.cos(t),
							i = Math.sin(t);
						return this.set(e, 0, i, 0, 0, 1, 0, 0, -i, 0, e, 0, 0, 0, 0, 1), this
					},
					makeRotationZ: function (t) {
						var e = Math.cos(t),
							i = Math.sin(t);
						return this.set(e, -i, 0, 0, i, e, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this
					},
					makeRotationAxis: function (t, e) {
						var i = Math.cos(e),
							n = Math.sin(e),
							r = 1 - i,
							a = t.x,
							o = t.y,
							s = t.z,
							h = r * a,
							l = r * o;
						return this.set(h * a + i, h * o - n * s, h * s + n * o, 0, h * o + n * s, l * o + i, l * s - n * a, 0, h * s - n * o, l * s + n * a, r * s * s + i, 0, 0, 0, 0, 1), this
					},
					makeScale: function (t, e, i) {
						return this.set(t, 0, 0, 0, 0, e, 0, 0, 0, 0, i, 0, 0, 0, 0, 1), this
					},
					makeShear: function (t, e, i) {
						return this.set(1, e, i, 0, t, 1, i, 0, t, e, 1, 0, 0, 0, 0, 1), this
					},
					compose: function (t, e, i) {
						return this.makeRotationFromQuaternion(e), this.scale(i), this.setPosition(t), this
					},
					decompose: function () {
						var t = new a,
							e = new n;
						return function (i, n, r) {
							var a = this.elements,
								o = t.set(a[0], a[1], a[2]).length(),
								s = t.set(a[4], a[5], a[6]).length(),
								h = t.set(a[8], a[9], a[10]).length();
							this.determinant() < 0 && (o = -o), i.x = a[12], i.y = a[13], i.z = a[14], e.copy(this);
							var l = 1 / o,
								c = 1 / s,
								u = 1 / h;
							return e.elements[0] *= l, e.elements[1] *= l, e.elements[2] *= l, e.elements[4] *= c, e.elements[5] *= c, e.elements[6] *= c, e.elements[8] *= u, e.elements[9] *= u, e.elements[10] *= u, n.setFromRotationMatrix(e), r.x = o, r.y = s, r.z = h, this
						}
					}(),
					makePerspective: function (t, e, i, n, r, a) {
						void 0 === a && console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");
						var o = this.elements,
							s = 2 * r / (e - t),
							h = 2 * r / (i - n),
							l = (e + t) / (e - t),
							c = (i + n) / (i - n),
							u = -(a + r) / (a - r),
							d = -2 * a * r / (a - r);
						return o[0] = s, o[4] = 0, o[8] = l, o[12] = 0, o[1] = 0, o[5] = h, o[9] = c, o[13] = 0, o[2] = 0, o[6] = 0, o[10] = u, o[14] = d, o[3] = 0, o[7] = 0, o[11] = -1, o[15] = 0, this
					},
					makeOrthographic: function (t, e, i, n, r, a) {
						var o = this.elements,
							s = 1 / (e - t),
							h = 1 / (i - n),
							l = 1 / (a - r),
							c = (e + t) * s,
							u = (i + n) * h,
							d = (a + r) * l;
						return o[0] = 2 * s, o[4] = 0, o[8] = 0, o[12] = -c, o[1] = 0, o[5] = 2 * h, o[9] = 0, o[13] = -u, o[2] = 0, o[6] = 0, o[10] = -2 * l, o[14] = -d, o[3] = 0, o[7] = 0, o[11] = 0, o[15] = 1, this
					},
					equals: function (t) {
						for (var e = this.elements, i = t.elements, n = 0; n < 16; n++)
							if (e[n] !== i[n]) return !1;
						return !0
					},
					fromArray: function (t, e) {
						void 0 === e && (e = 0);
						for (var i = 0; i < 16; i++) this.elements[i] = t[i + e];
						return this
					},
					toArray: function (t, e) {
						void 0 === t && (t = []), void 0 === e && (e = 0);
						var i = this.elements;
						return t[e] = i[0], t[e + 1] = i[1], t[e + 2] = i[2], t[e + 3] = i[3], t[e + 4] = i[4], t[e + 5] = i[5], t[e + 6] = i[6], t[e + 7] = i[7], t[e + 8] = i[8], t[e + 9] = i[9], t[e + 10] = i[10], t[e + 11] = i[11], t[e + 12] = i[12], t[e + 13] = i[13], t[e + 14] = i[14], t[e + 15] = i[15], t
					}
				}), Object.assign(r, {
					slerp: function (t, e, i, n) {
						return i.copy(t).slerp(e, n)
					},
					slerpFlat: function (t, e, i, n, r, a, o) {
						var s = i[n + 0],
							h = i[n + 1],
							l = i[n + 2],
							c = i[n + 3],
							u = r[a + 0],
							d = r[a + 1],
							f = r[a + 2],
							p = r[a + 3];
						if (c !== p || s !== u || h !== d || l !== f) {
							var m = 1 - o,
								g = s * u + h * d + l * f + c * p,
								v = g >= 0 ? 1 : -1,
								y = 1 - g * g;
							if (y > Number.EPSILON) {
								var b = Math.sqrt(y),
									x = Math.atan2(b, g * v);
								m = Math.sin(m * x) / b, o = Math.sin(o * x) / b
							}
							var _ = o * v;
							if (s = s * m + u * _, h = h * m + d * _, l = l * m + f * _, c = c * m + p * _, m === 1 - o) {
								var w = 1 / Math.sqrt(s * s + h * h + l * l + c * c);
								s *= w, h *= w, l *= w, c *= w
							}
						}
						t[e] = s, t[e + 1] = h, t[e + 2] = l, t[e + 3] = c
					}
				}), Object.defineProperties(r.prototype, {
					x: {
						get: function () {
							return this._x
						},
						set: function (t) {
							this._x = t, this.onChangeCallback()
						}
					},
					y: {
						get: function () {
							return this._y
						},
						set: function (t) {
							this._y = t, this.onChangeCallback()
						}
					},
					z: {
						get: function () {
							return this._z
						},
						set: function (t) {
							this._z = t, this.onChangeCallback()
						}
					},
					w: {
						get: function () {
							return this._w
						},
						set: function (t) {
							this._w = t, this.onChangeCallback()
						}
					}
				}), Object.assign(r.prototype, {
					set: function (t, e, i, n) {
						return this._x = t, this._y = e, this._z = i, this._w = n, this.onChangeCallback(), this
					},
					clone: function () {
						return new this.constructor(this._x, this._y, this._z, this._w)
					},
					copy: function (t) {
						return this._x = t.x, this._y = t.y, this._z = t.z, this._w = t.w, this.onChangeCallback(), this
					},
					setFromEuler: function (t, e) {
						if (!t || !t.isEuler) throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");
						var i = t._x,
							n = t._y,
							r = t._z,
							a = t.order,
							o = Math.cos,
							s = Math.sin,
							h = o(i / 2),
							l = o(n / 2),
							c = o(r / 2),
							u = s(i / 2),
							d = s(n / 2),
							f = s(r / 2);
						return "XYZ" === a ? (this._x = u * l * c + h * d * f, this._y = h * d * c - u * l * f, this._z = h * l * f + u * d * c, this._w = h * l * c - u * d * f) : "YXZ" === a ? (this._x = u * l * c + h * d * f, this._y = h * d * c - u * l * f, this._z = h * l * f - u * d * c, this._w = h * l * c + u * d * f) : "ZXY" === a ? (this._x = u * l * c - h * d * f, this._y = h * d * c + u * l * f, this._z = h * l * f + u * d * c, this._w = h * l * c - u * d * f) : "ZYX" === a ? (this._x = u * l * c - h * d * f, this._y = h * d * c + u * l * f, this._z = h * l * f - u * d * c, this._w = h * l * c + u * d * f) : "YZX" === a ? (this._x = u * l * c + h * d * f, this._y = h * d * c + u * l * f, this._z = h * l * f - u * d * c, this._w = h * l * c - u * d * f) : "XZY" === a && (this._x = u * l * c - h * d * f, this._y = h * d * c - u * l * f, this._z = h * l * f + u * d * c, this._w = h * l * c + u * d * f), !1 !== e && this.onChangeCallback(), this
					},
					setFromAxisAngle: function (t, e) {
						var i = e / 2,
							n = Math.sin(i);
						return this._x = t.x * n, this._y = t.y * n, this._z = t.z * n, this._w = Math.cos(i), this.onChangeCallback(), this
					},
					setFromRotationMatrix: function (t) {
						var e, i = t.elements,
							n = i[0],
							r = i[4],
							a = i[8],
							o = i[1],
							s = i[5],
							h = i[9],
							l = i[2],
							c = i[6],
							u = i[10],
							d = n + s + u;
						return d > 0 ? (e = .5 / Math.sqrt(d + 1), this._w = .25 / e, this._x = (c - h) * e, this._y = (a - l) * e, this._z = (o - r) * e) : n > s && n > u ? (e = 2 * Math.sqrt(1 + n - s - u), this._w = (c - h) / e, this._x = .25 * e, this._y = (r + o) / e, this._z = (a + l) / e) : s > u ? (e = 2 * Math.sqrt(1 + s - n - u), this._w = (a - l) / e, this._x = (r + o) / e, this._y = .25 * e, this._z = (h + c) / e) : (e = 2 * Math.sqrt(1 + u - n - s), this._w = (o - r) / e, this._x = (a + l) / e, this._y = (h + c) / e, this._z = .25 * e), this.onChangeCallback(), this
					},
					setFromUnitVectors: function () {
						var t, e = new a;
						return function (i, n) {
							return void 0 === e && (e = new a), (t = i.dot(n) + 1) < 1e-6 ? (t = 0, Math.abs(i.x) > Math.abs(i.z) ? e.set(-i.y, i.x, 0) : e.set(0, -i.z, i.y)) : e.crossVectors(i, n), this._x = e.x, this._y = e.y, this._z = e.z, this._w = t, this.normalize()
						}
					}(),
					inverse: function () {
						return this.conjugate().normalize()
					},
					conjugate: function () {
						return this._x *= -1, this._y *= -1, this._z *= -1, this.onChangeCallback(), this
					},
					dot: function (t) {
						return this._x * t._x + this._y * t._y + this._z * t._z + this._w * t._w
					},
					lengthSq: function () {
						return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w
					},
					length: function () {
						return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w)
					},
					normalize: function () {
						var t = this.length();
						return 0 === t ? (this._x = 0, this._y = 0, this._z = 0, this._w = 1) : (t = 1 / t, this._x = this._x * t, this._y = this._y * t, this._z = this._z * t, this._w = this._w * t), this.onChangeCallback(), this
					},
					multiply: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), this.multiplyQuaternions(t, e)) : this.multiplyQuaternions(this, t)
					},
					premultiply: function (t) {
						return this.multiplyQuaternions(t, this)
					},
					multiplyQuaternions: function (t, e) {
						var i = t._x,
							n = t._y,
							r = t._z,
							a = t._w,
							o = e._x,
							s = e._y,
							h = e._z,
							l = e._w;
						return this._x = i * l + a * o + n * h - r * s, this._y = n * l + a * s + r * o - i * h, this._z = r * l + a * h + i * s - n * o, this._w = a * l - i * o - n * s - r * h, this.onChangeCallback(), this
					},
					slerp: function (t, e) {
						if (0 === e) return this;
						if (1 === e) return this.copy(t);
						var i = this._x,
							n = this._y,
							r = this._z,
							a = this._w,
							o = a * t._w + i * t._x + n * t._y + r * t._z;
						if (o < 0 ? (this._w = -t._w, this._x = -t._x, this._y = -t._y, this._z = -t._z, o = -o) : this.copy(t), o >= 1) return this._w = a, this._x = i, this._y = n, this._z = r, this;
						var s = Math.sqrt(1 - o * o);
						if (Math.abs(s) < .001) return this._w = .5 * (a + this._w), this._x = .5 * (i + this._x), this._y = .5 * (n + this._y), this._z = .5 * (r + this._z), this;
						var h = Math.atan2(s, o),
							l = Math.sin((1 - e) * h) / s,
							c = Math.sin(e * h) / s;
						return this._w = a * l + this._w * c, this._x = i * l + this._x * c, this._y = n * l + this._y * c, this._z = r * l + this._z * c, this.onChangeCallback(), this
					},
					equals: function (t) {
						return t._x === this._x && t._y === this._y && t._z === this._z && t._w === this._w
					},
					fromArray: function (t, e) {
						return void 0 === e && (e = 0), this._x = t[e], this._y = t[e + 1], this._z = t[e + 2], this._w = t[e + 3], this.onChangeCallback(), this
					},
					toArray: function (t, e) {
						return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this._x, t[e + 1] = this._y, t[e + 2] = this._z, t[e + 3] = this._w, t
					},
					onChange: function (t) {
						return this.onChangeCallback = t, this
					},
					onChangeCallback: function () {}
				}), Object.assign(a.prototype, {
					isVector3: !0,
					set: function (t, e, i) {
						return this.x = t, this.y = e, this.z = i, this
					},
					setScalar: function (t) {
						return this.x = t, this.y = t, this.z = t, this
					},
					setX: function (t) {
						return this.x = t, this
					},
					setY: function (t) {
						return this.y = t, this
					},
					setZ: function (t) {
						return this.z = t, this
					},
					setComponent: function (t, e) {
						switch (t) {
							case 0:
								this.x = e;
								break;
							case 1:
								this.y = e;
								break;
							case 2:
								this.z = e;
								break;
							default:
								throw new Error("index is out of range: " + t)
						}
						return this
					},
					getComponent: function (t) {
						switch (t) {
							case 0:
								return this.x;
							case 1:
								return this.y;
							case 2:
								return this.z;
							default:
								throw new Error("index is out of range: " + t)
						}
					},
					clone: function () {
						return new this.constructor(this.x, this.y, this.z)
					},
					copy: function (t) {
						return this.x = t.x, this.y = t.y, this.z = t.z, this
					},
					add: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(t, e)) : (this.x += t.x, this.y += t.y, this.z += t.z, this)
					},
					addScalar: function (t) {
						return this.x += t, this.y += t, this.z += t, this
					},
					addVectors: function (t, e) {
						return this.x = t.x + e.x, this.y = t.y + e.y, this.z = t.z + e.z, this
					},
					addScaledVector: function (t, e) {
						return this.x += t.x * e, this.y += t.y * e, this.z += t.z * e, this
					},
					sub: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(t, e)) : (this.x -= t.x, this.y -= t.y, this.z -= t.z, this)
					},
					subScalar: function (t) {
						return this.x -= t, this.y -= t, this.z -= t, this
					},
					subVectors: function (t, e) {
						return this.x = t.x - e.x, this.y = t.y - e.y, this.z = t.z - e.z, this
					},
					multiply: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."), this.multiplyVectors(t, e)) : (this.x *= t.x, this.y *= t.y, this.z *= t.z, this)
					},
					multiplyScalar: function (t) {
						return this.x *= t, this.y *= t, this.z *= t, this
					},
					multiplyVectors: function (t, e) {
						return this.x = t.x * e.x, this.y = t.y * e.y, this.z = t.z * e.z, this
					},
					applyEuler: function () {
						var t = new r;
						return function (e) {
							return e && e.isEuler || console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."), this.applyQuaternion(t.setFromEuler(e))
						}
					}(),
					applyAxisAngle: function () {
						var t = new r;
						return function (e, i) {
							return this.applyQuaternion(t.setFromAxisAngle(e, i))
						}
					}(),
					applyMatrix3: function (t) {
						var e = this.x,
							i = this.y,
							n = this.z,
							r = t.elements;
						return this.x = r[0] * e + r[3] * i + r[6] * n, this.y = r[1] * e + r[4] * i + r[7] * n, this.z = r[2] * e + r[5] * i + r[8] * n, this
					},
					applyMatrix4: function (t) {
						var e = this.x,
							i = this.y,
							n = this.z,
							r = t.elements,
							a = 1 / (r[3] * e + r[7] * i + r[11] * n + r[15]);
						return this.x = (r[0] * e + r[4] * i + r[8] * n + r[12]) * a, this.y = (r[1] * e + r[5] * i + r[9] * n + r[13]) * a, this.z = (r[2] * e + r[6] * i + r[10] * n + r[14]) * a, this
					},
					applyQuaternion: function (t) {
						var e = this.x,
							i = this.y,
							n = this.z,
							r = t.x,
							a = t.y,
							o = t.z,
							s = t.w,
							h = s * e + a * n - o * i,
							l = s * i + o * e - r * n,
							c = s * n + r * i - a * e,
							u = -r * e - a * i - o * n;
						return this.x = h * s + u * -r + l * -o - c * -a, this.y = l * s + u * -a + c * -r - h * -o, this.z = c * s + u * -o + h * -a - l * -r, this
					},
					project: function () {
						var t = new n;
						return function (e) {
							return t.multiplyMatrices(e.projectionMatrix, t.getInverse(e.matrixWorld)), this.applyMatrix4(t)
						}
					}(),
					unproject: function () {
						var t = new n;
						return function (e) {
							return t.multiplyMatrices(e.matrixWorld, t.getInverse(e.projectionMatrix)), this.applyMatrix4(t)
						}
					}(),
					transformDirection: function (t) {
						var e = this.x,
							i = this.y,
							n = this.z,
							r = t.elements;
						return this.x = r[0] * e + r[4] * i + r[8] * n, this.y = r[1] * e + r[5] * i + r[9] * n, this.z = r[2] * e + r[6] * i + r[10] * n, this.normalize()
					},
					divide: function (t) {
						return this.x /= t.x, this.y /= t.y, this.z /= t.z, this
					},
					divideScalar: function (t) {
						return this.multiplyScalar(1 / t)
					},
					min: function (t) {
						return this.x = Math.min(this.x, t.x), this.y = Math.min(this.y, t.y), this.z = Math.min(this.z, t.z), this
					},
					max: function (t) {
						return this.x = Math.max(this.x, t.x), this.y = Math.max(this.y, t.y), this.z = Math.max(this.z, t.z), this
					},
					clamp: function (t, e) {
						return this.x = Math.max(t.x, Math.min(e.x, this.x)), this.y = Math.max(t.y, Math.min(e.y, this.y)), this.z = Math.max(t.z, Math.min(e.z, this.z)), this
					},
					clampScalar: function () {
						var t = new a,
							e = new a;
						return function (i, n) {
							return t.set(i, i, i), e.set(n, n, n), this.clamp(t, e)
						}
					}(),
					clampLength: function (t, e) {
						var i = this.length();
						return this.divideScalar(i || 1).multiplyScalar(Math.max(t, Math.min(e, i)))
					},
					floor: function () {
						return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this
					},
					ceil: function () {
						return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.z = Math.ceil(this.z), this
					},
					round: function () {
						return this.x = Math.round(this.x), this.y = Math.round(this.y), this.z = Math.round(this.z), this
					},
					roundToZero: function () {
						return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z), this
					},
					negate: function () {
						return this.x = -this.x, this.y = -this.y, this.z = -this.z, this
					},
					dot: function (t) {
						return this.x * t.x + this.y * t.y + this.z * t.z
					},
					lengthSq: function () {
						return this.x * this.x + this.y * this.y + this.z * this.z
					},
					length: function () {
						return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z)
					},
					manhattanLength: function () {
						return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z)
					},
					normalize: function () {
						return this.divideScalar(this.length() || 1)
					},
					setLength: function (t) {
						return this.normalize().multiplyScalar(t)
					},
					lerp: function (t, e) {
						return this.x += (t.x - this.x) * e, this.y += (t.y - this.y) * e, this.z += (t.z - this.z) * e, this
					},
					lerpVectors: function (t, e, i) {
						return this.subVectors(e, t).multiplyScalar(i).add(t)
					},
					cross: function (t, e) {
						if (void 0 !== e) return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."), this.crossVectors(t, e);
						var i = this.x,
							n = this.y,
							r = this.z;
						return this.x = n * t.z - r * t.y, this.y = r * t.x - i * t.z, this.z = i * t.y - n * t.x, this
					},
					crossVectors: function (t, e) {
						var i = t.x,
							n = t.y,
							r = t.z,
							a = e.x,
							o = e.y,
							s = e.z;
						return this.x = n * s - r * o, this.y = r * a - i * s, this.z = i * o - n * a, this
					},
					projectOnVector: function (t) {
						var e = t.dot(this) / t.lengthSq();
						return this.copy(t).multiplyScalar(e)
					},
					projectOnPlane: function () {
						var t = new a;
						return function (e) {
							return t.copy(this).projectOnVector(e), this.sub(t)
						}
					}(),
					reflect: function () {
						var t = new a;
						return function (e) {
							return this.sub(t.copy(e).multiplyScalar(2 * this.dot(e)))
						}
					}(),
					angleTo: function (t) {
						var e = this.dot(t) / Math.sqrt(this.lengthSq() * t.lengthSq());
						return Math.acos(Ya.clamp(e, -1, 1))
					},
					distanceTo: function (t) {
						return Math.sqrt(this.distanceToSquared(t))
					},
					distanceToSquared: function (t) {
						var e = this.x - t.x,
							i = this.y - t.y,
							n = this.z - t.z;
						return e * e + i * i + n * n
					},
					manhattanDistanceTo: function (t) {
						return Math.abs(this.x - t.x) + Math.abs(this.y - t.y) + Math.abs(this.z - t.z)
					},
					setFromSpherical: function (t) {
						var e = Math.sin(t.phi) * t.radius;
						return this.x = e * Math.sin(t.theta), this.y = Math.cos(t.phi) * t.radius, this.z = e * Math.cos(t.theta), this
					},
					setFromCylindrical: function (t) {
						return this.x = t.radius * Math.sin(t.theta), this.y = t.y, this.z = t.radius * Math.cos(t.theta), this
					},
					setFromMatrixPosition: function (t) {
						var e = t.elements;
						return this.x = e[12], this.y = e[13], this.z = e[14], this
					},
					setFromMatrixScale: function (t) {
						var e = this.setFromMatrixColumn(t, 0).length(),
							i = this.setFromMatrixColumn(t, 1).length(),
							n = this.setFromMatrixColumn(t, 2).length();
						return this.x = e, this.y = i, this.z = n, this
					},
					setFromMatrixColumn: function (t, e) {
						return this.fromArray(t.elements, 4 * e)
					},
					equals: function (t) {
						return t.x === this.x && t.y === this.y && t.z === this.z
					},
					fromArray: function (t, e) {
						return void 0 === e && (e = 0), this.x = t[e], this.y = t[e + 1], this.z = t[e + 2], this
					},
					toArray: function (t, e) {
						return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this.x, t[e + 1] = this.y, t[e + 2] = this.z, t
					},
					fromBufferAttribute: function (t, e, i) {
						return void 0 !== i && console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."), this.x = t.getX(e), this.y = t.getY(e), this.z = t.getZ(e), this
					}
				}), Object.assign(s.prototype, {
					isMatrix3: !0,
					set: function (t, e, i, n, r, a, o, s, h) {
						var l = this.elements;
						return l[0] = t, l[1] = n, l[2] = o, l[3] = e, l[4] = r, l[5] = s, l[6] = i, l[7] = a, l[8] = h, this
					},
					identity: function () {
						return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this
					},
					clone: function () {
						return (new this.constructor).fromArray(this.elements)
					},
					copy: function (t) {
						var e = this.elements,
							i = t.elements;
						return e[0] = i[0], e[1] = i[1], e[2] = i[2], e[3] = i[3], e[4] = i[4], e[5] = i[5], e[6] = i[6], e[7] = i[7], e[8] = i[8], this
					},
					setFromMatrix4: function (t) {
						var e = t.elements;
						return this.set(e[0], e[4], e[8], e[1], e[5], e[9], e[2], e[6], e[10]), this
					},
					applyToBufferAttribute: function () {
						var t = new a;
						return function (e) {
							for (var i = 0, n = e.count; i < n; i++) t.x = e.getX(i), t.y = e.getY(i), t.z = e.getZ(i), t.applyMatrix3(this), e.setXYZ(i, t.x, t.y, t.z);
							return e
						}
					}(),
					multiply: function (t) {
						return this.multiplyMatrices(this, t)
					},
					premultiply: function (t) {
						return this.multiplyMatrices(t, this)
					},
					multiplyMatrices: function (t, e) {
						var i = t.elements,
							n = e.elements,
							r = this.elements,
							a = i[0],
							o = i[3],
							s = i[6],
							h = i[1],
							l = i[4],
							c = i[7],
							u = i[2],
							d = i[5],
							f = i[8],
							p = n[0],
							m = n[3],
							g = n[6],
							v = n[1],
							y = n[4],
							b = n[7],
							x = n[2],
							_ = n[5],
							w = n[8];
						return r[0] = a * p + o * v + s * x, r[3] = a * m + o * y + s * _, r[6] = a * g + o * b + s * w, r[1] = h * p + l * v + c * x, r[4] = h * m + l * y + c * _, r[7] = h * g + l * b + c * w, r[2] = u * p + d * v + f * x, r[5] = u * m + d * y + f * _, r[8] = u * g + d * b + f * w, this
					},
					multiplyScalar: function (t) {
						var e = this.elements;
						return e[0] *= t, e[3] *= t, e[6] *= t, e[1] *= t, e[4] *= t, e[7] *= t, e[2] *= t, e[5] *= t, e[8] *= t, this
					},
					determinant: function () {
						var t = this.elements,
							e = t[0],
							i = t[1],
							n = t[2],
							r = t[3],
							a = t[4],
							o = t[5],
							s = t[6],
							h = t[7],
							l = t[8];
						return e * a * l - e * o * h - i * r * l + i * o * s + n * r * h - n * a * s
					},
					getInverse: function (t, e) {
						t && t.isMatrix4 && console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");
						var i = t.elements,
							n = this.elements,
							r = i[0],
							a = i[1],
							o = i[2],
							s = i[3],
							h = i[4],
							l = i[5],
							c = i[6],
							u = i[7],
							d = i[8],
							f = d * h - l * u,
							p = l * c - d * s,
							m = u * s - h * c,
							g = r * f + a * p + o * m;
						if (0 === g) {
							var v = "THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";
							if (!0 === e) throw new Error(v);
							return console.warn(v), this.identity()
						}
						var y = 1 / g;
						return n[0] = f * y, n[1] = (o * u - d * a) * y, n[2] = (l * a - o * h) * y, n[3] = p * y, n[4] = (d * r - o * c) * y, n[5] = (o * s - l * r) * y, n[6] = m * y, n[7] = (a * c - u * r) * y, n[8] = (h * r - a * s) * y, this
					},
					transpose: function () {
						var t, e = this.elements;
						return t = e[1], e[1] = e[3], e[3] = t, t = e[2], e[2] = e[6], e[6] = t, t = e[5], e[5] = e[7], e[7] = t, this
					},
					getNormalMatrix: function (t) {
						return this.setFromMatrix4(t).getInverse(this).transpose()
					},
					transposeIntoArray: function (t) {
						var e = this.elements;
						return t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = e[1], t[4] = e[4], t[5] = e[7], t[6] = e[2], t[7] = e[5], t[8] = e[8], this
					},
					setUvTransform: function (t, e, i, n, r, a, o) {
						var s = Math.cos(r),
							h = Math.sin(r);
						this.set(i * s, i * h, -i * (s * a + h * o) + a + t, -n * h, n * s, -n * (-h * a + s * o) + o + e, 0, 0, 1)
					},
					scale: function (t, e) {
						var i = this.elements;
						return i[0] *= t, i[3] *= t, i[6] *= t, i[1] *= e, i[4] *= e, i[7] *= e, this
					},
					rotate: function (t) {
						var e = Math.cos(t),
							i = Math.sin(t),
							n = this.elements,
							r = n[0],
							a = n[3],
							o = n[6],
							s = n[1],
							h = n[4],
							l = n[7];
						return n[0] = e * r + i * s, n[3] = e * a + i * h, n[6] = e * o + i * l, n[1] = -i * r + e * s, n[4] = -i * a + e * h, n[7] = -i * o + e * l, this
					},
					translate: function (t, e) {
						var i = this.elements;
						return i[0] += t * i[2], i[3] += t * i[5], i[6] += t * i[8], i[1] += e * i[2], i[4] += e * i[5], i[7] += e * i[8], this
					},
					equals: function (t) {
						for (var e = this.elements, i = t.elements, n = 0; n < 9; n++)
							if (e[n] !== i[n]) return !1;
						return !0
					},
					fromArray: function (t, e) {
						void 0 === e && (e = 0);
						for (var i = 0; i < 9; i++) this.elements[i] = t[i + e];
						return this
					},
					toArray: function (t, e) {
						void 0 === t && (t = []), void 0 === e && (e = 0);
						var i = this.elements;
						return t[e] = i[0], t[e + 1] = i[1], t[e + 2] = i[2], t[e + 3] = i[3], t[e + 4] = i[4], t[e + 5] = i[5], t[e + 6] = i[6], t[e + 7] = i[7], t[e + 8] = i[8], t
					}
				});
				var Za = 0;
				h.DEFAULT_IMAGE = void 0, h.DEFAULT_MAPPING = 300, Object.defineProperty(h.prototype, "needsUpdate", {
					set: function (t) {
						!0 === t && this.version++
					}
				}), Object.assign(h.prototype, e.prototype, {
					constructor: h,
					isTexture: !0,
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.name = t.name, this.image = t.image, this.mipmaps = t.mipmaps.slice(0), this.mapping = t.mapping, this.wrapS = t.wrapS, this.wrapT = t.wrapT, this.magFilter = t.magFilter, this.minFilter = t.minFilter, this.anisotropy = t.anisotropy, this.format = t.format, this.type = t.type, this.offset.copy(t.offset), this.repeat.copy(t.repeat), this.center.copy(t.center), this.rotation = t.rotation, this.matrixAutoUpdate = t.matrixAutoUpdate, this.matrix.copy(t.matrix), this.generateMipmaps = t.generateMipmaps, this.premultiplyAlpha = t.premultiplyAlpha, this.flipY = t.flipY, this.unpackAlignment = t.unpackAlignment, this.encoding = t.encoding, this
					},
					toJSON: function (t) {
						var e = void 0 === t || "string" == typeof t;
						if (!e && void 0 !== t.textures[this.uuid]) return t.textures[this.uuid];
						var i = {
							metadata: {
								version: 4.5,
								type: "Texture",
								generator: "Texture.toJSON"
							},
							uuid: this.uuid,
							name: this.name,
							mapping: this.mapping,
							repeat: [this.repeat.x, this.repeat.y],
							offset: [this.offset.x, this.offset.y],
							center: [this.center.x, this.center.y],
							rotation: this.rotation,
							wrap: [this.wrapS, this.wrapT],
							minFilter: this.minFilter,
							magFilter: this.magFilter,
							anisotropy: this.anisotropy,
							flipY: this.flipY
						};
						if (void 0 !== this.image) {
							var n = this.image;
							void 0 === n.uuid && (n.uuid = Ya.generateUUID()), e || void 0 !== t.images[n.uuid] || (t.images[n.uuid] = {
								uuid: n.uuid,
								url: function (t) {
									var e;
									if (t instanceof HTMLCanvasElement) e = t;
									else {
										(e = document.createElement("canvas")).width = t.width, e.height = t.height;
										var i = e.getContext("2d");
										t instanceof ImageData ? i.putImageData(t, 0, 0) : i.drawImage(t, 0, 0, t.width, t.height)
									}
									return e.width > 2048 || e.height > 2048 ? e.toDataURL("image/jpeg", .6) : e.toDataURL("image/png")
								}(n)
							}), i.image = n.uuid
						}
						return e || (t.textures[this.uuid] = i), i
					},
					dispose: function () {
						this.dispatchEvent({
							type: "dispose"
						})
					},
					transformUv: function (t) {
						if (300 === this.mapping) {
							if (t.applyMatrix3(this.matrix), t.x < 0 || t.x > 1) switch (this.wrapS) {
								case Jr:
									t.x = t.x - Math.floor(t.x);
									break;
								case Qr:
									t.x = t.x < 0 ? 0 : 1;
									break;
								case $r:
									1 === Math.abs(Math.floor(t.x) % 2) ? t.x = Math.ceil(t.x) - t.x : t.x = t.x - Math.floor(t.x)
							}
							if (t.y < 0 || t.y > 1) switch (this.wrapT) {
								case Jr:
									t.y = t.y - Math.floor(t.y);
									break;
								case Qr:
									t.y = t.y < 0 ? 0 : 1;
									break;
								case $r:
									1 === Math.abs(Math.floor(t.y) % 2) ? t.y = Math.ceil(t.y) - t.y : t.y = t.y - Math.floor(t.y)
							}
							this.flipY && (t.y = 1 - t.y)
						}
					}
				}), Object.assign(l.prototype, {
					isVector4: !0,
					set: function (t, e, i, n) {
						return this.x = t, this.y = e, this.z = i, this.w = n, this
					},
					setScalar: function (t) {
						return this.x = t, this.y = t, this.z = t, this.w = t, this
					},
					setX: function (t) {
						return this.x = t, this
					},
					setY: function (t) {
						return this.y = t, this
					},
					setZ: function (t) {
						return this.z = t, this
					},
					setW: function (t) {
						return this.w = t, this
					},
					setComponent: function (t, e) {
						switch (t) {
							case 0:
								this.x = e;
								break;
							case 1:
								this.y = e;
								break;
							case 2:
								this.z = e;
								break;
							case 3:
								this.w = e;
								break;
							default:
								throw new Error("index is out of range: " + t)
						}
						return this
					},
					getComponent: function (t) {
						switch (t) {
							case 0:
								return this.x;
							case 1:
								return this.y;
							case 2:
								return this.z;
							case 3:
								return this.w;
							default:
								throw new Error("index is out of range: " + t)
						}
					},
					clone: function () {
						return new this.constructor(this.x, this.y, this.z, this.w)
					},
					copy: function (t) {
						return this.x = t.x, this.y = t.y, this.z = t.z, this.w = void 0 !== t.w ? t.w : 1, this
					},
					add: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), this.addVectors(t, e)) : (this.x += t.x, this.y += t.y, this.z += t.z, this.w += t.w, this)
					},
					addScalar: function (t) {
						return this.x += t, this.y += t, this.z += t, this.w += t, this
					},
					addVectors: function (t, e) {
						return this.x = t.x + e.x, this.y = t.y + e.y, this.z = t.z + e.z, this.w = t.w + e.w, this
					},
					addScaledVector: function (t, e) {
						return this.x += t.x * e, this.y += t.y * e, this.z += t.z * e, this.w += t.w * e, this
					},
					sub: function (t, e) {
						return void 0 !== e ? (console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(t, e)) : (this.x -= t.x, this.y -= t.y, this.z -= t.z, this.w -= t.w, this)
					},
					subScalar: function (t) {
						return this.x -= t, this.y -= t, this.z -= t, this.w -= t, this
					},
					subVectors: function (t, e) {
						return this.x = t.x - e.x, this.y = t.y - e.y, this.z = t.z - e.z, this.w = t.w - e.w, this
					},
					multiplyScalar: function (t) {
						return this.x *= t, this.y *= t, this.z *= t, this.w *= t, this
					},
					applyMatrix4: function (t) {
						var e = this.x,
							i = this.y,
							n = this.z,
							r = this.w,
							a = t.elements;
						return this.x = a[0] * e + a[4] * i + a[8] * n + a[12] * r, this.y = a[1] * e + a[5] * i + a[9] * n + a[13] * r, this.z = a[2] * e + a[6] * i + a[10] * n + a[14] * r, this.w = a[3] * e + a[7] * i + a[11] * n + a[15] * r, this
					},
					divideScalar: function (t) {
						return this.multiplyScalar(1 / t)
					},
					setAxisAngleFromQuaternion: function (t) {
						this.w = 2 * Math.acos(t.w);
						var e = Math.sqrt(1 - t.w * t.w);
						return e < 1e-4 ? (this.x = 1, this.y = 0, this.z = 0) : (this.x = t.x / e, this.y = t.y / e, this.z = t.z / e), this
					},
					setAxisAngleFromRotationMatrix: function (t) {
						var e, i, n, r, a = t.elements,
							o = a[0],
							s = a[4],
							h = a[8],
							l = a[1],
							c = a[5],
							u = a[9],
							d = a[2],
							f = a[6],
							p = a[10];
						if (Math.abs(s - l) < .01 && Math.abs(h - d) < .01 && Math.abs(u - f) < .01) {
							if (Math.abs(s + l) < .1 && Math.abs(h + d) < .1 && Math.abs(u + f) < .1 && Math.abs(o + c + p - 3) < .1) return this.set(1, 0, 0, 0), this;
							e = Math.PI;
							var m = (o + 1) / 2,
								g = (c + 1) / 2,
								v = (p + 1) / 2,
								y = (s + l) / 4,
								b = (h + d) / 4,
								x = (u + f) / 4;
							return m > g && m > v ? m < .01 ? (i = 0, n = .707106781, r = .707106781) : (n = y / (i = Math.sqrt(m)), r = b / i) : g > v ? g < .01 ? (i = .707106781, n = 0, r = .707106781) : (i = y / (n = Math.sqrt(g)), r = x / n) : v < .01 ? (i = .707106781, n = .707106781, r = 0) : (i = b / (r = Math.sqrt(v)), n = x / r), this.set(i, n, r, e), this
						}
						var _ = Math.sqrt((f - u) * (f - u) + (h - d) * (h - d) + (l - s) * (l - s));
						return Math.abs(_) < .001 && (_ = 1), this.x = (f - u) / _, this.y = (h - d) / _, this.z = (l - s) / _, this.w = Math.acos((o + c + p - 1) / 2), this
					},
					min: function (t) {
						return this.x = Math.min(this.x, t.x), this.y = Math.min(this.y, t.y), this.z = Math.min(this.z, t.z), this.w = Math.min(this.w, t.w), this
					},
					max: function (t) {
						return this.x = Math.max(this.x, t.x), this.y = Math.max(this.y, t.y), this.z = Math.max(this.z, t.z), this.w = Math.max(this.w, t.w), this
					},
					clamp: function (t, e) {
						return this.x = Math.max(t.x, Math.min(e.x, this.x)), this.y = Math.max(t.y, Math.min(e.y, this.y)), this.z = Math.max(t.z, Math.min(e.z, this.z)), this.w = Math.max(t.w, Math.min(e.w, this.w)), this
					},
					clampScalar: function () {
						var t, e;
						return function (i, n) {
							return void 0 === t && (t = new l, e = new l), t.set(i, i, i, i), e.set(n, n, n, n), this.clamp(t, e)
						}
					}(),
					clampLength: function (t, e) {
						var i = this.length();
						return this.divideScalar(i || 1).multiplyScalar(Math.max(t, Math.min(e, i)))
					},
					floor: function () {
						return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this.w = Math.floor(this.w), this
					},
					ceil: function () {
						return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.z = Math.ceil(this.z), this.w = Math.ceil(this.w), this
					},
					round: function () {
						return this.x = Math.round(this.x), this.y = Math.round(this.y), this.z = Math.round(this.z), this.w = Math.round(this.w), this
					},
					roundToZero: function () {
						return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z), this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w), this
					},
					negate: function () {
						return this.x = -this.x, this.y = -this.y, this.z = -this.z, this.w = -this.w, this
					},
					dot: function (t) {
						return this.x * t.x + this.y * t.y + this.z * t.z + this.w * t.w
					},
					lengthSq: function () {
						return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w
					},
					length: function () {
						return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w)
					},
					manhattanLength: function () {
						return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w)
					},
					normalize: function () {
						return this.divideScalar(this.length() || 1)
					},
					setLength: function (t) {
						return this.normalize().multiplyScalar(t)
					},
					lerp: function (t, e) {
						return this.x += (t.x - this.x) * e, this.y += (t.y - this.y) * e, this.z += (t.z - this.z) * e, this.w += (t.w - this.w) * e, this
					},
					lerpVectors: function (t, e, i) {
						return this.subVectors(e, t).multiplyScalar(i).add(t)
					},
					equals: function (t) {
						return t.x === this.x && t.y === this.y && t.z === this.z && t.w === this.w
					},
					fromArray: function (t, e) {
						return void 0 === e && (e = 0), this.x = t[e], this.y = t[e + 1], this.z = t[e + 2], this.w = t[e + 3], this
					},
					toArray: function (t, e) {
						return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this.x, t[e + 1] = this.y, t[e + 2] = this.z, t[e + 3] = this.w, t
					},
					fromBufferAttribute: function (t, e, i) {
						return void 0 !== i && console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."), this.x = t.getX(e), this.y = t.getY(e), this.z = t.getZ(e), this.w = t.getW(e), this
					}
				}), Object.assign(c.prototype, e.prototype, {
					isWebGLRenderTarget: !0,
					setSize: function (t, e) {
						this.width === t && this.height === e || (this.width = t, this.height = e, this.dispose()), this.viewport.set(0, 0, t, e), this.scissor.set(0, 0, t, e)
					},
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.width = t.width, this.height = t.height, this.viewport.copy(t.viewport), this.texture = t.texture.clone(), this.depthBuffer = t.depthBuffer, this.stencilBuffer = t.stencilBuffer, this.depthTexture = t.depthTexture, this
					},
					dispose: function () {
						this.dispatchEvent({
							type: "dispose"
						})
					}
				}), (u.prototype = Object.create(c.prototype)).constructor = u, u.prototype.isWebGLRenderTargetCube = !0, (d.prototype = Object.create(h.prototype)).constructor = d, d.prototype.isDataTexture = !0, (f.prototype = Object.create(h.prototype)).constructor = f, f.prototype.isCubeTexture = !0, Object.defineProperty(f.prototype, "images", {
					get: function () {
						return this.image
					},
					set: function (t) {
						this.image = t
					}
				});
				var Ja = new h,
					Qa = new f,
					$a = [],
					to = [],
					eo = new Float32Array(16),
					io = new Float32Array(9);
				G.prototype.setValue = function (t, e) {
					for (var i = this.seq, n = 0, r = i.length; n !== r; ++n) {
						var a = i[n];
						a.setValue(t, e[a.id])
					}
				};
				var no = /([\w\d_]+)(\])?(\[|\.)?/g;
				W.prototype.setValue = function (t, e, i) {
					var n = this.map[e];
					void 0 !== n && n.setValue(t, i, this.renderer)
				}, W.prototype.setOptional = function (t, e, i) {
					var n = e[i];
					void 0 !== n && this.setValue(t, i, n)
				}, W.upload = function (t, e, i, n) {
					for (var r = 0, a = e.length; r !== a; ++r) {
						var o = e[r],
							s = i[o.id];
						!1 !== s.needsUpdate && o.setValue(t, s.value, n)
					}
				}, W.seqWithValue = function (t, e) {
					for (var i = [], n = 0, r = t.length; n !== r; ++n) {
						var a = t[n];
						a.id in e && i.push(a)
					}
					return i
				};
				var ro = {
					aliceblue: 15792383,
					antiquewhite: 16444375,
					aqua: 65535,
					aquamarine: 8388564,
					azure: 15794175,
					beige: 16119260,
					bisque: 16770244,
					black: 0,
					blanchedalmond: 16772045,
					blue: 255,
					blueviolet: 9055202,
					brown: 10824234,
					burlywood: 14596231,
					cadetblue: 6266528,
					chartreuse: 8388352,
					chocolate: 13789470,
					coral: 16744272,
					cornflowerblue: 6591981,
					cornsilk: 16775388,
					crimson: 14423100,
					cyan: 65535,
					darkblue: 139,
					darkcyan: 35723,
					darkgoldenrod: 12092939,
					darkgray: 11119017,
					darkgreen: 25600,
					darkgrey: 11119017,
					darkkhaki: 12433259,
					darkmagenta: 9109643,
					darkolivegreen: 5597999,
					darkorange: 16747520,
					darkorchid: 10040012,
					darkred: 9109504,
					darksalmon: 15308410,
					darkseagreen: 9419919,
					darkslateblue: 4734347,
					darkslategray: 3100495,
					darkslategrey: 3100495,
					darkturquoise: 52945,
					darkviolet: 9699539,
					deeppink: 16716947,
					deepskyblue: 49151,
					dimgray: 6908265,
					dimgrey: 6908265,
					dodgerblue: 2003199,
					firebrick: 11674146,
					floralwhite: 16775920,
					forestgreen: 2263842,
					fuchsia: 16711935,
					gainsboro: 14474460,
					ghostwhite: 16316671,
					gold: 16766720,
					goldenrod: 14329120,
					gray: 8421504,
					green: 32768,
					greenyellow: 11403055,
					grey: 8421504,
					honeydew: 15794160,
					hotpink: 16738740,
					indianred: 13458524,
					indigo: 4915330,
					ivory: 16777200,
					khaki: 15787660,
					lavender: 15132410,
					lavenderblush: 16773365,
					lawngreen: 8190976,
					lemonchiffon: 16775885,
					lightblue: 11393254,
					lightcoral: 15761536,
					lightcyan: 14745599,
					lightgoldenrodyellow: 16448210,
					lightgray: 13882323,
					lightgreen: 9498256,
					lightgrey: 13882323,
					lightpink: 16758465,
					lightsalmon: 16752762,
					lightseagreen: 2142890,
					lightskyblue: 8900346,
					lightslategray: 7833753,
					lightslategrey: 7833753,
					lightsteelblue: 11584734,
					lightyellow: 16777184,
					lime: 65280,
					limegreen: 3329330,
					linen: 16445670,
					magenta: 16711935,
					maroon: 8388608,
					mediumaquamarine: 6737322,
					mediumblue: 205,
					mediumorchid: 12211667,
					mediumpurple: 9662683,
					mediumseagreen: 3978097,
					mediumslateblue: 8087790,
					mediumspringgreen: 64154,
					mediumturquoise: 4772300,
					mediumvioletred: 13047173,
					midnightblue: 1644912,
					mintcream: 16121850,
					mistyrose: 16770273,
					moccasin: 16770229,
					navajowhite: 16768685,
					navy: 128,
					oldlace: 16643558,
					olive: 8421376,
					olivedrab: 7048739,
					orange: 16753920,
					orangered: 16729344,
					orchid: 14315734,
					palegoldenrod: 15657130,
					palegreen: 10025880,
					paleturquoise: 11529966,
					palevioletred: 14381203,
					papayawhip: 16773077,
					peachpuff: 16767673,
					peru: 13468991,
					pink: 16761035,
					plum: 14524637,
					powderblue: 11591910,
					purple: 8388736,
					rebeccapurple: 6697881,
					red: 16711680,
					rosybrown: 12357519,
					royalblue: 4286945,
					saddlebrown: 9127187,
					salmon: 16416882,
					sandybrown: 16032864,
					seagreen: 3050327,
					seashell: 16774638,
					sienna: 10506797,
					silver: 12632256,
					skyblue: 8900331,
					slateblue: 6970061,
					slategray: 7372944,
					slategrey: 7372944,
					snow: 16775930,
					springgreen: 65407,
					steelblue: 4620980,
					tan: 13808780,
					teal: 32896,
					thistle: 14204888,
					tomato: 16737095,
					turquoise: 4251856,
					violet: 15631086,
					wheat: 16113331,
					white: 16777215,
					whitesmoke: 16119285,
					yellow: 16776960,
					yellowgreen: 10145074
				};
				Object.assign(q.prototype, {
					isColor: !0,
					r: 1,
					g: 1,
					b: 1,
					set: function (t) {
						return t && t.isColor ? this.copy(t) : "number" == typeof t ? this.setHex(t) : "string" == typeof t && this.setStyle(t), this
					},
					setScalar: function (t) {
						return this.r = t, this.g = t, this.b = t, this
					},
					setHex: function (t) {
						return t = Math.floor(t), this.r = (t >> 16 & 255) / 255, this.g = (t >> 8 & 255) / 255, this.b = (255 & t) / 255, this
					},
					setRGB: function (t, e, i) {
						return this.r = t, this.g = e, this.b = i, this
					},
					setHSL: function () {
						function t(t, e, i) {
							return i < 0 && (i += 1), i > 1 && (i -= 1), i < 1 / 6 ? t + 6 * (e - t) * i : i < .5 ? e : i < 2 / 3 ? t + 6 * (e - t) * (2 / 3 - i) : t
						}
						return function (e, i, n) {
							if (e = Ya.euclideanModulo(e, 1), i = Ya.clamp(i, 0, 1), n = Ya.clamp(n, 0, 1), 0 === i) this.r = this.g = this.b = n;
							else {
								var r = n <= .5 ? n * (1 + i) : n + i - n * i,
									a = 2 * n - r;
								this.r = t(a, r, e + 1 / 3), this.g = t(a, r, e), this.b = t(a, r, e - 1 / 3)
							}
							return this
						}
					}(),
					setStyle: function (t) {
						function e(e) {
							void 0 !== e && parseFloat(e) < 1 && console.warn("THREE.Color: Alpha component of " + t + " will be ignored.")
						}
						var i;
						if (i = /^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)) {
							var n, r = i[1],
								a = i[2];
							switch (r) {
								case "rgb":
								case "rgba":
									if (n = /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)) return this.r = Math.min(255, parseInt(n[1], 10)) / 255, this.g = Math.min(255, parseInt(n[2], 10)) / 255, this.b = Math.min(255, parseInt(n[3], 10)) / 255, e(n[5]), this;
									if (n = /^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)) return this.r = Math.min(100, parseInt(n[1], 10)) / 100, this.g = Math.min(100, parseInt(n[2], 10)) / 100, this.b = Math.min(100, parseInt(n[3], 10)) / 100, e(n[5]), this;
									break;
								case "hsl":
								case "hsla":
									if (n = /^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)) {
										var o = parseFloat(n[1]) / 360,
											s = parseInt(n[2], 10) / 100,
											h = parseInt(n[3], 10) / 100;
										return e(n[5]), this.setHSL(o, s, h)
									}
							}
						} else if (i = /^\#([A-Fa-f0-9]+)$/.exec(t)) {
							var l = (c = i[1]).length;
							if (3 === l) return this.r = parseInt(c.charAt(0) + c.charAt(0), 16) / 255, this.g = parseInt(c.charAt(1) + c.charAt(1), 16) / 255, this.b = parseInt(c.charAt(2) + c.charAt(2), 16) / 255, this;
							if (6 === l) return this.r = parseInt(c.charAt(0) + c.charAt(1), 16) / 255, this.g = parseInt(c.charAt(2) + c.charAt(3), 16) / 255, this.b = parseInt(c.charAt(4) + c.charAt(5), 16) / 255, this
						}
						if (t && t.length > 0) {
							var c = ro[t];
							void 0 !== c ? this.setHex(c) : console.warn("THREE.Color: Unknown color " + t)
						}
						return this
					},
					clone: function () {
						return new this.constructor(this.r, this.g, this.b)
					},
					copy: function (t) {
						return this.r = t.r, this.g = t.g, this.b = t.b, this
					},
					copyGammaToLinear: function (t, e) {
						return void 0 === e && (e = 2), this.r = Math.pow(t.r, e), this.g = Math.pow(t.g, e), this.b = Math.pow(t.b, e), this
					},
					copyLinearToGamma: function (t, e) {
						void 0 === e && (e = 2);
						var i = e > 0 ? 1 / e : 1;
						return this.r = Math.pow(t.r, i), this.g = Math.pow(t.g, i), this.b = Math.pow(t.b, i), this
					},
					convertGammaToLinear: function () {
						var t = this.r,
							e = this.g,
							i = this.b;
						return this.r = t * t, this.g = e * e, this.b = i * i, this
					},
					convertLinearToGamma: function () {
						return this.r = Math.sqrt(this.r), this.g = Math.sqrt(this.g), this.b = Math.sqrt(this.b), this
					},
					getHex: function () {
						return 255 * this.r << 16 ^ 255 * this.g << 8 ^ 255 * this.b << 0
					},
					getHexString: function () {
						return ("000000" + this.getHex().toString(16)).slice(-6)
					},
					getHSL: function (t) {
						var e, i, n = t || {
								h: 0,
								s: 0,
								l: 0
							},
							r = this.r,
							a = this.g,
							o = this.b,
							s = Math.max(r, a, o),
							h = Math.min(r, a, o),
							l = (h + s) / 2;
						if (h === s) e = 0, i = 0;
						else {
							var c = s - h;
							switch (i = l <= .5 ? c / (s + h) : c / (2 - s - h), s) {
								case r:
									e = (a - o) / c + (a < o ? 6 : 0);
									break;
								case a:
									e = (o - r) / c + 2;
									break;
								case o:
									e = (r - a) / c + 4
							}
							e /= 6
						}
						return n.h = e, n.s = i, n.l = l, n
					},
					getStyle: function () {
						return "rgb(" + (255 * this.r | 0) + "," + (255 * this.g | 0) + "," + (255 * this.b | 0) + ")"
					},
					offsetHSL: function (t, e, i) {
						var n = this.getHSL();
						return n.h += t, n.s += e, n.l += i, this.setHSL(n.h, n.s, n.l), this
					},
					add: function (t) {
						return this.r += t.r, this.g += t.g, this.b += t.b, this
					},
					addColors: function (t, e) {
						return this.r = t.r + e.r, this.g = t.g + e.g, this.b = t.b + e.b, this
					},
					addScalar: function (t) {
						return this.r += t, this.g += t, this.b += t, this
					},
					sub: function (t) {
						return this.r = Math.max(0, this.r - t.r), this.g = Math.max(0, this.g - t.g), this.b = Math.max(0, this.b - t.b), this
					},
					multiply: function (t) {
						return this.r *= t.r, this.g *= t.g, this.b *= t.b, this
					},
					multiplyScalar: function (t) {
						return this.r *= t, this.g *= t, this.b *= t, this
					},
					lerp: function (t, e) {
						return this.r += (t.r - this.r) * e, this.g += (t.g - this.g) * e, this.b += (t.b - this.b) * e, this
					},
					equals: function (t) {
						return t.r === this.r && t.g === this.g && t.b === this.b
					},
					fromArray: function (t, e) {
						return void 0 === e && (e = 0), this.r = t[e], this.g = t[e + 1], this.b = t[e + 2], this
					},
					toArray: function (t, e) {
						return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this.r, t[e + 1] = this.g, t[e + 2] = this.b, t
					},
					toJSON: function () {
						return this.getHex()
					}
				});
				var ao = {
						common: {
							diffuse: {
								value: new q(15658734)
							},
							opacity: {
								value: 1
							},
							map: {
								value: null
							},
							uvTransform: {
								value: new s
							},
							alphaMap: {
								value: null
							}
						},
						specularmap: {
							specularMap: {
								value: null
							}
						},
						envmap: {
							envMap: {
								value: null
							},
							flipEnvMap: {
								value: -1
							},
							reflectivity: {
								value: 1
							},
							refractionRatio: {
								value: .98
							}
						},
						aomap: {
							aoMap: {
								value: null
							},
							aoMapIntensity: {
								value: 1
							}
						},
						lightmap: {
							lightMap: {
								value: null
							},
							lightMapIntensity: {
								value: 1
							}
						},
						emissivemap: {
							emissiveMap: {
								value: null
							}
						},
						bumpmap: {
							bumpMap: {
								value: null
							},
							bumpScale: {
								value: 1
							}
						},
						normalmap: {
							normalMap: {
								value: null
							},
							normalScale: {
								value: new i(1, 1)
							}
						},
						displacementmap: {
							displacementMap: {
								value: null
							},
							displacementScale: {
								value: 1
							},
							displacementBias: {
								value: 0
							}
						},
						roughnessmap: {
							roughnessMap: {
								value: null
							}
						},
						metalnessmap: {
							metalnessMap: {
								value: null
							}
						},
						gradientmap: {
							gradientMap: {
								value: null
							}
						},
						fog: {
							fogDensity: {
								value: 25e-5
							},
							fogNear: {
								value: 1
							},
							fogFar: {
								value: 2e3
							},
							fogColor: {
								value: new q(16777215)
							}
						},
						lights: {
							ambientLightColor: {
								value: []
							},
							directionalLights: {
								value: [],
								properties: {
									direction: {},
									color: {},
									shadow: {},
									shadowBias: {},
									shadowRadius: {},
									shadowMapSize: {}
								}
							},
							directionalShadowMap: {
								value: []
							},
							directionalShadowMatrix: {
								value: []
							},
							spotLights: {
								value: [],
								properties: {
									color: {},
									position: {},
									direction: {},
									distance: {},
									coneCos: {},
									penumbraCos: {},
									decay: {},
									shadow: {},
									shadowBias: {},
									shadowRadius: {},
									shadowMapSize: {}
								}
							},
							spotShadowMap: {
								value: []
							},
							spotShadowMatrix: {
								value: []
							},
							pointLights: {
								value: [],
								properties: {
									color: {},
									position: {},
									decay: {},
									distance: {},
									shadow: {},
									shadowBias: {},
									shadowRadius: {},
									shadowMapSize: {},
									shadowCameraNear: {},
									shadowCameraFar: {}
								}
							},
							pointShadowMap: {
								value: []
							},
							pointShadowMatrix: {
								value: []
							},
							hemisphereLights: {
								value: [],
								properties: {
									direction: {},
									skyColor: {},
									groundColor: {}
								}
							},
							rectAreaLights: {
								value: [],
								properties: {
									color: {},
									position: {},
									width: {},
									height: {}
								}
							}
						},
						points: {
							diffuse: {
								value: new q(15658734)
							},
							opacity: {
								value: 1
							},
							size: {
								value: 1
							},
							scale: {
								value: 1
							},
							map: {
								value: null
							},
							uvTransform: {
								value: new s
							}
						}
					},
					oo = {
						merge: function (t) {
							for (var e = {}, i = 0; i < t.length; i++) {
								var n = this.clone(t[i]);
								for (var r in n) e[r] = n[r]
							}
							return e
						},
						clone: function (t) {
							var e = {};
							for (var i in t) {
								e[i] = {};
								for (var n in t[i]) {
									var r = t[i][n];
									r && (r.isColor || r.isMatrix3 || r.isMatrix4 || r.isVector2 || r.isVector3 || r.isVector4 || r.isTexture) ? e[i][n] = r.clone() : Array.isArray(r) ? e[i][n] = r.slice() : e[i][n] = r
								}
							}
							return e
						}
					},
					so = {
						alphamap_fragment: "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",
						alphamap_pars_fragment: "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",
						alphatest_fragment: "#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",
						aomap_fragment: "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",
						aomap_pars_fragment: "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",
						begin_vertex: "\nvec3 transformed = vec3( position );\n",
						beginnormal_vertex: "\nvec3 objectNormal = vec3( normal );\n",
						bsdfs: "float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE  = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\n\tfloat theta = acos( dot( N, V ) );\n\tvec2 uv = vec2(\n\t\tsqrt( saturate( roughness ) ),\n\t\tsaturate( theta / ( 0.5 * PI ) ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.86267 + (0.49788 + 0.01436 * y ) * y;\n\tfloat b = 3.45068 + (4.18814 + y) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = (x > 0.0) ? v : 0.5 * inversesqrt( 1.0 - x * x ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tvec3 result = vec3( LTC_ClippedSphereFormFactor( vectorFormFactor ) );\n\treturn result;\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",
						bumpmap_pars_fragment: "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",
						clipping_planes_fragment: "#if NUM_CLIPPING_PLANES > 0\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; ++ i ) {\n\t\tvec4 plane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t\t\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; ++ i ) {\n\t\t\tvec4 plane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t\n\t#endif\n#endif\n",
						clipping_planes_pars_fragment: "#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",
						clipping_planes_pars_vertex: "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",
						clipping_planes_vertex: "#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",
						color_fragment: "#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",
						color_pars_fragment: "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",
						color_pars_vertex: "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",
						color_vertex: "#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",
						common: "#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",
						cube_uv_reflection_fragment: "#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale =  bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",
						defaultnormal_vertex: "vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",
						displacementmap_pars_vertex: "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",
						displacementmap_vertex: "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",
						emissivemap_fragment: "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",
						emissivemap_pars_fragment: "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",
						encodings_fragment: "  gl_FragColor = linearToOutputTexel( gl_FragColor );\n",
						encodings_pars_fragment: "\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM            = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D      = max( maxRange / maxRGB, 1.0 );\n\tD            = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",
						envmap_fragment: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",
						envmap_pars_fragment: "#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",
						envmap_pars_vertex: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",
						envmap_vertex: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",
						fog_vertex: "\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",
						fog_pars_vertex: "#ifdef USE_FOG\n  varying float fogDepth;\n#endif\n",
						fog_fragment: "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",
						fog_pars_fragment: "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",
						gradientmap_pars_fragment: "#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",
						lightmap_fragment: "#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",
						lightmap_pars_fragment: "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",
						lights_lambert_vertex: "vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",
						lights_pars: "uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltcMat;\tuniform sampler2D ltcMag;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",
						lights_phong_fragment: "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",
						lights_phong_pars_fragment: "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",
						lights_physical_fragment: "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",
						lights_physical_pars_fragment: "struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tfloat norm = texture2D( ltcMag, uv ).a;\n\t\tvec4 t = texture2D( ltcMat, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3(   1,   0, t.y ),\n\t\t\tvec3(   0, t.z,   0 ),\n\t\t\tvec3( t.w,   0, t.x )\n\t\t);\n\t\treflectedLight.directSpecular += lightColor * material.specularColor * norm * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",
						lights_template: "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, 8 );\n\t#endif\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tvec3 radiance = getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), 8 );\n\t#ifndef STANDARD\n\t\tvec3 clearCoatRadiance = getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), 8 );\n\t#else\n\t\tvec3 clearCoatRadiance = vec3( 0.0 );\n\t#endif\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",
						logdepthbuf_fragment: "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",
						logdepthbuf_pars_fragment: "#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",
						logdepthbuf_pars_vertex: "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",
						logdepthbuf_vertex: "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",
						map_fragment: "#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",
						map_pars_fragment: "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",
						map_particle_fragment: "#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",
						map_particle_pars_fragment: "#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",
						metalnessmap_fragment: "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",
						metalnessmap_pars_fragment: "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",
						morphnormal_vertex: "#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",
						morphtarget_pars_vertex: "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",
						morphtarget_vertex: "#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",
						normal_fragment: "#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",
						normalmap_pars_fragment: "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n\t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",
						packing: "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",
						premultiplied_alpha_fragment: "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",
						project_vertex: "vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",
						dithering_fragment: "#if defined( DITHERING )\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",
						dithering_pars_fragment: "#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n",
						roughnessmap_fragment: "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",
						roughnessmap_pars_fragment: "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",
						shadowmap_pars_fragment: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",
						shadowmap_pars_vertex: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",
						shadowmap_vertex: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",
						shadowmask_pars_fragment: "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",
						skinbase_vertex: "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",
						skinning_pars_vertex: "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",
						skinning_vertex: "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",
						skinnormal_vertex: "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",
						specularmap_fragment: "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",
						specularmap_pars_fragment: "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",
						tonemapping_fragment: "#if defined( TONE_MAPPING )\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",
						tonemapping_pars_fragment: "#define saturate(a) clamp( a, 0.0, 1.0 )\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",
						uv_pars_fragment: "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",
						uv_pars_vertex: "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n",
						uv_vertex: "#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",
						uv2_pars_fragment: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",
						uv2_pars_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",
						uv2_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",
						worldpos_vertex: "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",
						cube_frag: "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",
						cube_vert: "varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n",
						depth_frag: "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",
						depth_vert: "#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",
						distanceRGBA_frag: "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n",
						distanceRGBA_vert: "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n",
						equirect_frag: "uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",
						equirect_vert: "varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",
						linedashed_frag: "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",
						linedashed_vert: "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n",
						meshbasic_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",
						meshbasic_vert: "#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n",
						meshlambert_frag: "uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",
						meshlambert_vert: "#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",
						meshphong_frag: "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",
						meshphong_vert: "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",
						meshphysical_frag: "#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_template>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",
						meshphysical_vert: "#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",
						normal_frag: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",
						normal_vert: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",
						points_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",
						points_vert: "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",
						shadow_frag: "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n",
						shadow_vert: "#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n"
					},
					ho = {
						basic: {
							uniforms: oo.merge([ao.common, ao.specularmap, ao.envmap, ao.aomap, ao.lightmap, ao.fog]),
							vertexShader: so.meshbasic_vert,
							fragmentShader: so.meshbasic_frag
						},
						lambert: {
							uniforms: oo.merge([ao.common, ao.specularmap, ao.envmap, ao.aomap, ao.lightmap, ao.emissivemap, ao.fog, ao.lights, {
								emissive: {
									value: new q(0)
								}
							}]),
							vertexShader: so.meshlambert_vert,
							fragmentShader: so.meshlambert_frag
						},
						phong: {
							uniforms: oo.merge([ao.common, ao.specularmap, ao.envmap, ao.aomap, ao.lightmap, ao.emissivemap, ao.bumpmap, ao.normalmap, ao.displacementmap, ao.gradientmap, ao.fog, ao.lights, {
								emissive: {
									value: new q(0)
								},
								specular: {
									value: new q(1118481)
								},
								shininess: {
									value: 30
								}
							}]),
							vertexShader: so.meshphong_vert,
							fragmentShader: so.meshphong_frag
						},
						standard: {
							uniforms: oo.merge([ao.common, ao.envmap, ao.aomap, ao.lightmap, ao.emissivemap, ao.bumpmap, ao.normalmap, ao.displacementmap, ao.roughnessmap, ao.metalnessmap, ao.fog, ao.lights, {
								emissive: {
									value: new q(0)
								},
								roughness: {
									value: .5
								},
								metalness: {
									value: .5
								},
								envMapIntensity: {
									value: 1
								}
							}]),
							vertexShader: so.meshphysical_vert,
							fragmentShader: so.meshphysical_frag
						},
						points: {
							uniforms: oo.merge([ao.points, ao.fog]),
							vertexShader: so.points_vert,
							fragmentShader: so.points_frag
						},
						dashed: {
							uniforms: oo.merge([ao.common, ao.fog, {
								scale: {
									value: 1
								},
								dashSize: {
									value: 1
								},
								totalSize: {
									value: 2
								}
							}]),
							vertexShader: so.linedashed_vert,
							fragmentShader: so.linedashed_frag
						},
						depth: {
							uniforms: oo.merge([ao.common, ao.displacementmap]),
							vertexShader: so.depth_vert,
							fragmentShader: so.depth_frag
						},
						normal: {
							uniforms: oo.merge([ao.common, ao.bumpmap, ao.normalmap, ao.displacementmap, {
								opacity: {
									value: 1
								}
							}]),
							vertexShader: so.normal_vert,
							fragmentShader: so.normal_frag
						},
						cube: {
							uniforms: {
								tCube: {
									value: null
								},
								tFlip: {
									value: -1
								},
								opacity: {
									value: 1
								}
							},
							vertexShader: so.cube_vert,
							fragmentShader: so.cube_frag
						},
						equirect: {
							uniforms: {
								tEquirect: {
									value: null
								}
							},
							vertexShader: so.equirect_vert,
							fragmentShader: so.equirect_frag
						},
						distanceRGBA: {
							uniforms: oo.merge([ao.common, ao.displacementmap, {
								referencePosition: {
									value: new a
								},
								nearDistance: {
									value: 1
								},
								farDistance: {
									value: 1e3
								}
							}]),
							vertexShader: so.distanceRGBA_vert,
							fragmentShader: so.distanceRGBA_frag
						},
						shadow: {
							uniforms: oo.merge([ao.lights, ao.fog, {
								color: {
									value: new q(0)
								},
								opacity: {
									value: 1
								}
							}]),
							vertexShader: so.shadow_vert,
							fragmentShader: so.shadow_frag
						}
					};
				ho.physical = {
					uniforms: oo.merge([ho.standard.uniforms, {
						clearCoat: {
							value: 0
						},
						clearCoatRoughness: {
							value: 0
						}
					}]),
					vertexShader: so.meshphysical_vert,
					fragmentShader: so.meshphysical_frag
				}, Object.assign(X.prototype, {
					set: function (t, e) {
						return this.min.copy(t), this.max.copy(e), this
					},
					setFromPoints: function (t) {
						this.makeEmpty();
						for (var e = 0, i = t.length; e < i; e++) this.expandByPoint(t[e]);
						return this
					},
					setFromCenterAndSize: function () {
						var t = new i;
						return function (e, i) {
							var n = t.copy(i).multiplyScalar(.5);
							return this.min.copy(e).sub(n), this.max.copy(e).add(n), this
						}
					}(),
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.min.copy(t.min), this.max.copy(t.max), this
					},
					makeEmpty: function () {
						return this.min.x = this.min.y = 1 / 0, this.max.x = this.max.y = -1 / 0, this
					},
					isEmpty: function () {
						return this.max.x < this.min.x || this.max.y < this.min.y
					},
					getCenter: function (t) {
						var e = t || new i;
						return this.isEmpty() ? e.set(0, 0) : e.addVectors(this.min, this.max).multiplyScalar(.5)
					},
					getSize: function (t) {
						var e = t || new i;
						return this.isEmpty() ? e.set(0, 0) : e.subVectors(this.max, this.min)
					},
					expandByPoint: function (t) {
						return this.min.min(t), this.max.max(t), this
					},
					expandByVector: function (t) {
						return this.min.sub(t), this.max.add(t), this
					},
					expandByScalar: function (t) {
						return this.min.addScalar(-t), this.max.addScalar(t), this
					},
					containsPoint: function (t) {
						return !(t.x < this.min.x || t.x > this.max.x || t.y < this.min.y || t.y > this.max.y)
					},
					containsBox: function (t) {
						return this.min.x <= t.min.x && t.max.x <= this.max.x && this.min.y <= t.min.y && t.max.y <= this.max.y
					},
					getParameter: function (t, e) {
						return (e || new i).set((t.x - this.min.x) / (this.max.x - this.min.x), (t.y - this.min.y) / (this.max.y - this.min.y))
					},
					intersectsBox: function (t) {
						return !(t.max.x < this.min.x || t.min.x > this.max.x || t.max.y < this.min.y || t.min.y > this.max.y)
					},
					clampPoint: function (t, e) {
						return (e || new i).copy(t).clamp(this.min, this.max)
					},
					distanceToPoint: function () {
						var t = new i;
						return function (e) {
							return t.copy(e).clamp(this.min, this.max).sub(e).length()
						}
					}(),
					intersect: function (t) {
						return this.min.max(t.min), this.max.min(t.max), this
					},
					union: function (t) {
						return this.min.min(t.min), this.max.max(t.max), this
					},
					translate: function (t) {
						return this.min.add(t), this.max.add(t), this
					},
					equals: function (t) {
						return t.min.equals(this.min) && t.max.equals(this.max)
					}
				}), (Y.prototype = Object.create(h.prototype)).constructor = Y;
				var lo = 0;
				Object.assign(J.prototype, e.prototype, {
					isMaterial: !0,
					onBeforeCompile: function () {},
					setValues: function (t) {
						if (void 0 !== t)
							for (var e in t) {
								var i = t[e];
								if (void 0 !== i)
									if ("shading" !== e) {
										var n = this[e];
										void 0 !== n ? n && n.isColor ? n.set(i) : n && n.isVector3 && i && i.isVector3 ? n.copy(i) : this[e] = "overdraw" === e ? Number(i) : i : console.warn("THREE." + this.type + ": '" + e + "' is not a property of this material.")
									} else console.warn("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."), this.flatShading = 1 === i;
								else console.warn("THREE.Material: '" + e + "' parameter is undefined.")
							}
					},
					toJSON: function (t) {
						function e(t) {
							var e = [];
							for (var i in t) {
								var n = t[i];
								delete n.metadata, e.push(n)
							}
							return e
						}
						var i = void 0 === t || "string" == typeof t;
						i && (t = {
							textures: {},
							images: {}
						});
						var n = {
							metadata: {
								version: 4.5,
								type: "Material",
								generator: "Material.toJSON"
							}
						};
						if (n.uuid = this.uuid, n.type = this.type, "" !== this.name && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), void 0 !== this.roughness && (n.roughness = this.roughness), void 0 !== this.metalness && (n.metalness = this.metalness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), 1 !== this.emissiveIntensity && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), void 0 !== this.shininess && (n.shininess = this.shininess), void 0 !== this.clearCoat && (n.clearCoat = this.clearCoat), void 0 !== this.clearCoatRoughness && (n.clearCoatRoughness = this.clearCoatRoughness), this.map && this.map.isTexture && (n.map = this.map.toJSON(t).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(t).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(t).uuid), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(t).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(t).uuid, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(t).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(t).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(t).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(t).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(t).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(t).uuid, n.reflectivity = this.reflectivity), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(t).uuid), void 0 !== this.size && (n.size = this.size), void 0 !== this.sizeAttenuation && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== sr && (n.blending = this.blending), !0 === this.flatShading && (n.flatShading = this.flatShading), this.side !== tr && (n.side = this.side), this.vertexColors !== nr && (n.vertexColors = this.vertexColors), this.opacity < 1 && (n.opacity = this.opacity), !0 === this.transparent && (n.transparent = this.transparent), n.depthFunc = this.depthFunc, n.depthTest = this.depthTest, n.depthWrite = this.depthWrite, 0 !== this.rotation && (n.rotation = this.rotation), 1 !== this.linewidth && (n.linewidth = this.linewidth), void 0 !== this.dashSize && (n.dashSize = this.dashSize), void 0 !== this.gapSize && (n.gapSize = this.gapSize), void 0 !== this.scale && (n.scale = this.scale), !0 === this.dithering && (n.dithering = !0), this.alphaTest > 0 && (n.alphaTest = this.alphaTest), !0 === this.premultipliedAlpha && (n.premultipliedAlpha = this.premultipliedAlpha), !0 === this.wireframe && (n.wireframe = this.wireframe), this.wireframeLinewidth > 1 && (n.wireframeLinewidth = this.wireframeLinewidth), "round" !== this.wireframeLinecap && (n.wireframeLinecap = this.wireframeLinecap), "round" !== this.wireframeLinejoin && (n.wireframeLinejoin = this.wireframeLinejoin), !0 === this.morphTargets && (n.morphTargets = !0), !0 === this.skinning && (n.skinning = !0), !1 === this.visible && (n.visible = !1), "{}" !== JSON.stringify(this.userData) && (n.userData = this.userData), i) {
							var r = e(t.textures),
								a = e(t.images);
							r.length > 0 && (n.textures = r), a.length > 0 && (n.images = a)
						}
						return n
					},
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						this.name = t.name, this.fog = t.fog, this.lights = t.lights, this.blending = t.blending, this.side = t.side, this.flatShading = t.flatShading, this.vertexColors = t.vertexColors, this.opacity = t.opacity, this.transparent = t.transparent, this.blendSrc = t.blendSrc, this.blendDst = t.blendDst, this.blendEquation = t.blendEquation, this.blendSrcAlpha = t.blendSrcAlpha, this.blendDstAlpha = t.blendDstAlpha, this.blendEquationAlpha = t.blendEquationAlpha, this.depthFunc = t.depthFunc, this.depthTest = t.depthTest, this.depthWrite = t.depthWrite, this.colorWrite = t.colorWrite, this.precision = t.precision, this.polygonOffset = t.polygonOffset, this.polygonOffsetFactor = t.polygonOffsetFactor, this.polygonOffsetUnits = t.polygonOffsetUnits, this.dithering = t.dithering, this.alphaTest = t.alphaTest, this.premultipliedAlpha = t.premultipliedAlpha, this.overdraw = t.overdraw, this.visible = t.visible, this.userData = JSON.parse(JSON.stringify(t.userData)), this.clipShadows = t.clipShadows, this.clipIntersection = t.clipIntersection;
						var e = t.clippingPlanes,
							i = null;
						if (null !== e) {
							var n = e.length;
							i = new Array(n);
							for (var r = 0; r !== n; ++r) i[r] = e[r].clone()
						}
						return this.clippingPlanes = i, this
					},
					dispose: function () {
						this.dispatchEvent({
							type: "dispose"
						})
					}
				}), (Q.prototype = Object.create(J.prototype)).constructor = Q, Q.prototype.isMeshDepthMaterial = !0, Q.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.depthPacking = t.depthPacking, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.map = t.map, this.alphaMap = t.alphaMap, this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this
				}, ($.prototype = Object.create(J.prototype)).constructor = $, $.prototype.isMeshDistanceMaterial = !0, $.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.referencePosition.copy(t.referencePosition), this.nearDistance = t.nearDistance, this.farDistance = t.farDistance, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.map = t.map, this.alphaMap = t.alphaMap, this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this
				}, Object.assign(tt.prototype, {
					isBox3: !0,
					set: function (t, e) {
						return this.min.copy(t), this.max.copy(e), this
					},
					setFromArray: function (t) {
						for (var e = 1 / 0, i = 1 / 0, n = 1 / 0, r = -1 / 0, a = -1 / 0, o = -1 / 0, s = 0, h = t.length; s < h; s += 3) {
							var l = t[s],
								c = t[s + 1],
								u = t[s + 2];
							l < e && (e = l), c < i && (i = c), u < n && (n = u), l > r && (r = l), c > a && (a = c), u > o && (o = u)
						}
						return this.min.set(e, i, n), this.max.set(r, a, o), this
					},
					setFromBufferAttribute: function (t) {
						for (var e = 1 / 0, i = 1 / 0, n = 1 / 0, r = -1 / 0, a = -1 / 0, o = -1 / 0, s = 0, h = t.count; s < h; s++) {
							var l = t.getX(s),
								c = t.getY(s),
								u = t.getZ(s);
							l < e && (e = l), c < i && (i = c), u < n && (n = u), l > r && (r = l), c > a && (a = c), u > o && (o = u)
						}
						return this.min.set(e, i, n), this.max.set(r, a, o), this
					},
					setFromPoints: function (t) {
						this.makeEmpty();
						for (var e = 0, i = t.length; e < i; e++) this.expandByPoint(t[e]);
						return this
					},
					setFromCenterAndSize: function () {
						var t = new a;
						return function (e, i) {
							var n = t.copy(i).multiplyScalar(.5);
							return this.min.copy(e).sub(n), this.max.copy(e).add(n), this
						}
					}(),
					setFromObject: function (t) {
						return this.makeEmpty(), this.expandByObject(t)
					},
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.min.copy(t.min), this.max.copy(t.max), this
					},
					makeEmpty: function () {
						return this.min.x = this.min.y = this.min.z = 1 / 0, this.max.x = this.max.y = this.max.z = -1 / 0, this
					},
					isEmpty: function () {
						return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z
					},
					getCenter: function (t) {
						var e = t || new a;
						return this.isEmpty() ? e.set(0, 0, 0) : e.addVectors(this.min, this.max).multiplyScalar(.5)
					},
					getSize: function (t) {
						var e = t || new a;
						return this.isEmpty() ? e.set(0, 0, 0) : e.subVectors(this.max, this.min)
					},
					expandByPoint: function (t) {
						return this.min.min(t), this.max.max(t), this
					},
					expandByVector: function (t) {
						return this.min.sub(t), this.max.add(t), this
					},
					expandByScalar: function (t) {
						return this.min.addScalar(-t), this.max.addScalar(t), this
					},
					expandByObject: function () {
						function t(t) {
							var a = t.geometry;
							if (void 0 !== a)
								if (a.isGeometry) {
									var o = a.vertices;
									for (i = 0, n = o.length; i < n; i++) r.copy(o[i]), r.applyMatrix4(t.matrixWorld), e.expandByPoint(r)
								} else if (a.isBufferGeometry) {
								var s = a.attributes.position;
								if (void 0 !== s)
									for (i = 0, n = s.count; i < n; i++) r.fromBufferAttribute(s, i).applyMatrix4(t.matrixWorld), e.expandByPoint(r)
							}
						}
						var e, i, n, r = new a;
						return function (i) {
							return e = this, i.updateMatrixWorld(!0), i.traverse(t), this
						}
					}(),
					containsPoint: function (t) {
						return !(t.x < this.min.x || t.x > this.max.x || t.y < this.min.y || t.y > this.max.y || t.z < this.min.z || t.z > this.max.z)
					},
					containsBox: function (t) {
						return this.min.x <= t.min.x && t.max.x <= this.max.x && this.min.y <= t.min.y && t.max.y <= this.max.y && this.min.z <= t.min.z && t.max.z <= this.max.z
					},
					getParameter: function (t, e) {
						return (e || new a).set((t.x - this.min.x) / (this.max.x - this.min.x), (t.y - this.min.y) / (this.max.y - this.min.y), (t.z - this.min.z) / (this.max.z - this.min.z))
					},
					intersectsBox: function (t) {
						return !(t.max.x < this.min.x || t.min.x > this.max.x || t.max.y < this.min.y || t.min.y > this.max.y || t.max.z < this.min.z || t.min.z > this.max.z)
					},
					intersectsSphere: function () {
						var t = new a;
						return function (e) {
							return this.clampPoint(e.center, t), t.distanceToSquared(e.center) <= e.radius * e.radius
						}
					}(),
					intersectsPlane: function (t) {
						var e, i;
						return t.normal.x > 0 ? (e = t.normal.x * this.min.x, i = t.normal.x * this.max.x) : (e = t.normal.x * this.max.x, i = t.normal.x * this.min.x), t.normal.y > 0 ? (e += t.normal.y * this.min.y, i += t.normal.y * this.max.y) : (e += t.normal.y * this.max.y, i += t.normal.y * this.min.y), t.normal.z > 0 ? (e += t.normal.z * this.min.z, i += t.normal.z * this.max.z) : (e += t.normal.z * this.max.z, i += t.normal.z * this.min.z), e <= t.constant && i >= t.constant
					},
					clampPoint: function (t, e) {
						return (e || new a).copy(t).clamp(this.min, this.max)
					},
					distanceToPoint: function () {
						var t = new a;
						return function (e) {
							return t.copy(e).clamp(this.min, this.max).sub(e).length()
						}
					}(),
					getBoundingSphere: function () {
						var t = new a;
						return function (e) {
							var i = e || new et;
							return this.getCenter(i.center), i.radius = .5 * this.getSize(t).length(), i
						}
					}(),
					intersect: function (t) {
						return this.min.max(t.min), this.max.min(t.max), this.isEmpty() && this.makeEmpty(), this
					},
					union: function (t) {
						return this.min.min(t.min), this.max.max(t.max), this
					},
					applyMatrix4: function () {
						var t = [new a, new a, new a, new a, new a, new a, new a, new a];
						return function (e) {
							return this.isEmpty() ? this : (t[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), t[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), t[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), t[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), t[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), t[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), t[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), t[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.setFromPoints(t), this)
						}
					}(),
					translate: function (t) {
						return this.min.add(t), this.max.add(t), this
					},
					equals: function (t) {
						return t.min.equals(this.min) && t.max.equals(this.max)
					}
				}), Object.assign(et.prototype, {
					set: function (t, e) {
						return this.center.copy(t), this.radius = e, this
					},
					setFromPoints: function () {
						var t = new tt;
						return function (e, i) {
							var n = this.center;
							void 0 !== i ? n.copy(i) : t.setFromPoints(e).getCenter(n);
							for (var r = 0, a = 0, o = e.length; a < o; a++) r = Math.max(r, n.distanceToSquared(e[a]));
							return this.radius = Math.sqrt(r), this
						}
					}(),
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.center.copy(t.center), this.radius = t.radius, this
					},
					empty: function () {
						return this.radius <= 0
					},
					containsPoint: function (t) {
						return t.distanceToSquared(this.center) <= this.radius * this.radius
					},
					distanceToPoint: function (t) {
						return t.distanceTo(this.center) - this.radius
					},
					intersectsSphere: function (t) {
						var e = this.radius + t.radius;
						return t.center.distanceToSquared(this.center) <= e * e
					},
					intersectsBox: function (t) {
						return t.intersectsSphere(this)
					},
					intersectsPlane: function (t) {
						return Math.abs(t.distanceToPoint(this.center)) <= this.radius
					},
					clampPoint: function (t, e) {
						var i = this.center.distanceToSquared(t),
							n = e || new a;
						return n.copy(t), i > this.radius * this.radius && (n.sub(this.center).normalize(), n.multiplyScalar(this.radius).add(this.center)), n
					},
					getBoundingBox: function (t) {
						var e = t || new tt;
						return e.set(this.center, this.center), e.expandByScalar(this.radius), e
					},
					applyMatrix4: function (t) {
						return this.center.applyMatrix4(t), this.radius = this.radius * t.getMaxScaleOnAxis(), this
					},
					translate: function (t) {
						return this.center.add(t), this
					},
					equals: function (t) {
						return t.center.equals(this.center) && t.radius === this.radius
					}
				}), Object.assign(it.prototype, {
					set: function (t, e) {
						return this.normal.copy(t), this.constant = e, this
					},
					setComponents: function (t, e, i, n) {
						return this.normal.set(t, e, i), this.constant = n, this
					},
					setFromNormalAndCoplanarPoint: function (t, e) {
						return this.normal.copy(t), this.constant = -e.dot(this.normal), this
					},
					setFromCoplanarPoints: function () {
						var t = new a,
							e = new a;
						return function (i, n, r) {
							var a = t.subVectors(r, n).cross(e.subVectors(i, n)).normalize();
							return this.setFromNormalAndCoplanarPoint(a, i), this
						}
					}(),
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.normal.copy(t.normal), this.constant = t.constant, this
					},
					normalize: function () {
						var t = 1 / this.normal.length();
						return this.normal.multiplyScalar(t), this.constant *= t, this
					},
					negate: function () {
						return this.constant *= -1, this.normal.negate(), this
					},
					distanceToPoint: function (t) {
						return this.normal.dot(t) + this.constant
					},
					distanceToSphere: function (t) {
						return this.distanceToPoint(t.center) - t.radius
					},
					projectPoint: function (t, e) {
						return (e || new a).copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)
					},
					intersectLine: function () {
						var t = new a;
						return function (e, i) {
							var n = i || new a,
								r = e.delta(t),
								o = this.normal.dot(r);
							if (0 !== o) {
								var s = -(e.start.dot(this.normal) + this.constant) / o;
								if (!(s < 0 || s > 1)) return n.copy(r).multiplyScalar(s).add(e.start)
							} else if (0 === this.distanceToPoint(e.start)) return n.copy(e.start)
						}
					}(),
					intersectsLine: function (t) {
						var e = this.distanceToPoint(t.start),
							i = this.distanceToPoint(t.end);
						return e < 0 && i > 0 || i < 0 && e > 0
					},
					intersectsBox: function (t) {
						return t.intersectsPlane(this)
					},
					intersectsSphere: function (t) {
						return t.intersectsPlane(this)
					},
					coplanarPoint: function (t) {
						return (t || new a).copy(this.normal).multiplyScalar(-this.constant)
					},
					applyMatrix4: function () {
						var t = new a,
							e = new s;
						return function (i, n) {
							var r = n || e.getNormalMatrix(i),
								a = this.coplanarPoint(t).applyMatrix4(i),
								o = this.normal.applyMatrix3(r).normalize();
							return this.constant = -a.dot(o), this
						}
					}(),
					translate: function (t) {
						return this.constant -= t.dot(this.normal), this
					},
					equals: function (t) {
						return t.normal.equals(this.normal) && t.constant === this.constant
					}
				}), Object.assign(nt.prototype, {
					set: function (t, e, i, n, r, a) {
						var o = this.planes;
						return o[0].copy(t), o[1].copy(e), o[2].copy(i), o[3].copy(n), o[4].copy(r), o[5].copy(a), this
					},
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						for (var e = this.planes, i = 0; i < 6; i++) e[i].copy(t.planes[i]);
						return this
					},
					setFromMatrix: function (t) {
						var e = this.planes,
							i = t.elements,
							n = i[0],
							r = i[1],
							a = i[2],
							o = i[3],
							s = i[4],
							h = i[5],
							l = i[6],
							c = i[7],
							u = i[8],
							d = i[9],
							f = i[10],
							p = i[11],
							m = i[12],
							g = i[13],
							v = i[14],
							y = i[15];
						return e[0].setComponents(o - n, c - s, p - u, y - m).normalize(), e[1].setComponents(o + n, c + s, p + u, y + m).normalize(), e[2].setComponents(o + r, c + h, p + d, y + g).normalize(), e[3].setComponents(o - r, c - h, p - d, y - g).normalize(), e[4].setComponents(o - a, c - l, p - f, y - v).normalize(), e[5].setComponents(o + a, c + l, p + f, y + v).normalize(), this
					},
					intersectsObject: function () {
						var t = new et;
						return function (e) {
							var i = e.geometry;
							return null === i.boundingSphere && i.computeBoundingSphere(), t.copy(i.boundingSphere).applyMatrix4(e.matrixWorld), this.intersectsSphere(t)
						}
					}(),
					intersectsSprite: function () {
						var t = new et;
						return function (e) {
							return t.center.set(0, 0, 0), t.radius = .7071067811865476, t.applyMatrix4(e.matrixWorld), this.intersectsSphere(t)
						}
					}(),
					intersectsSphere: function (t) {
						for (var e = this.planes, i = t.center, n = -t.radius, r = 0; r < 6; r++) {
							if (e[r].distanceToPoint(i) < n) return !1
						}
						return !0
					},
					intersectsBox: function () {
						var t = new a,
							e = new a;
						return function (i) {
							for (var n = this.planes, r = 0; r < 6; r++) {
								var a = n[r];
								t.x = a.normal.x > 0 ? i.min.x : i.max.x, e.x = a.normal.x > 0 ? i.max.x : i.min.x, t.y = a.normal.y > 0 ? i.min.y : i.max.y, e.y = a.normal.y > 0 ? i.max.y : i.min.y, t.z = a.normal.z > 0 ? i.min.z : i.max.z, e.z = a.normal.z > 0 ? i.max.z : i.min.z;
								var o = a.distanceToPoint(t),
									s = a.distanceToPoint(e);
								if (o < 0 && s < 0) return !1
							}
							return !0
						}
					}(),
					containsPoint: function (t) {
						for (var e = this.planes, i = 0; i < 6; i++)
							if (e[i].distanceToPoint(t) < 0) return !1;
						return !0
					}
				}), ot.RotationOrders = ["XYZ", "YZX", "ZXY", "XZY", "YXZ", "ZYX"], ot.DefaultOrder = "XYZ", Object.defineProperties(ot.prototype, {
					x: {
						get: function () {
							return this._x
						},
						set: function (t) {
							this._x = t, this.onChangeCallback()
						}
					},
					y: {
						get: function () {
							return this._y
						},
						set: function (t) {
							this._y = t, this.onChangeCallback()
						}
					},
					z: {
						get: function () {
							return this._z
						},
						set: function (t) {
							this._z = t, this.onChangeCallback()
						}
					},
					order: {
						get: function () {
							return this._order
						},
						set: function (t) {
							this._order = t, this.onChangeCallback()
						}
					}
				}), Object.assign(ot.prototype, {
					isEuler: !0,
					set: function (t, e, i, n) {
						return this._x = t, this._y = e, this._z = i, this._order = n || this._order, this.onChangeCallback(), this
					},
					clone: function () {
						return new this.constructor(this._x, this._y, this._z, this._order)
					},
					copy: function (t) {
						return this._x = t._x, this._y = t._y, this._z = t._z, this._order = t._order, this.onChangeCallback(), this
					},
					setFromRotationMatrix: function (t, e, i) {
						var n = Ya.clamp,
							r = t.elements,
							a = r[0],
							o = r[4],
							s = r[8],
							h = r[1],
							l = r[5],
							c = r[9],
							u = r[2],
							d = r[6],
							f = r[10];
						return "XYZ" === (e = e || this._order) ? (this._y = Math.asin(n(s, -1, 1)), Math.abs(s) < .99999 ? (this._x = Math.atan2(-c, f), this._z = Math.atan2(-o, a)) : (this._x = Math.atan2(d, l), this._z = 0)) : "YXZ" === e ? (this._x = Math.asin(-n(c, -1, 1)), Math.abs(c) < .99999 ? (this._y = Math.atan2(s, f), this._z = Math.atan2(h, l)) : (this._y = Math.atan2(-u, a), this._z = 0)) : "ZXY" === e ? (this._x = Math.asin(n(d, -1, 1)), Math.abs(d) < .99999 ? (this._y = Math.atan2(-u, f), this._z = Math.atan2(-o, l)) : (this._y = 0, this._z = Math.atan2(h, a))) : "ZYX" === e ? (this._y = Math.asin(-n(u, -1, 1)), Math.abs(u) < .99999 ? (this._x = Math.atan2(d, f), this._z = Math.atan2(h, a)) : (this._x = 0, this._z = Math.atan2(-o, l))) : "YZX" === e ? (this._z = Math.asin(n(h, -1, 1)), Math.abs(h) < .99999 ? (this._x = Math.atan2(-c, l), this._y = Math.atan2(-u, a)) : (this._x = 0, this._y = Math.atan2(s, f))) : "XZY" === e ? (this._z = Math.asin(-n(o, -1, 1)), Math.abs(o) < .99999 ? (this._x = Math.atan2(d, l), this._y = Math.atan2(s, a)) : (this._x = Math.atan2(-c, f), this._y = 0)) : console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: " + e), this._order = e, !1 !== i && this.onChangeCallback(), this
					},
					setFromQuaternion: function () {
						var t = new n;
						return function (e, i, n) {
							return t.makeRotationFromQuaternion(e), this.setFromRotationMatrix(t, i, n)
						}
					}(),
					setFromVector3: function (t, e) {
						return this.set(t.x, t.y, t.z, e || this._order)
					},
					reorder: function () {
						var t = new r;
						return function (e) {
							return t.setFromEuler(this), this.setFromQuaternion(t, e)
						}
					}(),
					equals: function (t) {
						return t._x === this._x && t._y === this._y && t._z === this._z && t._order === this._order
					},
					fromArray: function (t) {
						return this._x = t[0], this._y = t[1], this._z = t[2], void 0 !== t[3] && (this._order = t[3]), this.onChangeCallback(), this
					},
					toArray: function (t, e) {
						return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this._x, t[e + 1] = this._y, t[e + 2] = this._z, t[e + 3] = this._order, t
					},
					toVector3: function (t) {
						return t ? t.set(this._x, this._y, this._z) : new a(this._x, this._y, this._z)
					},
					onChange: function (t) {
						return this.onChangeCallback = t, this
					},
					onChangeCallback: function () {}
				}), Object.assign(st.prototype, {
					set: function (t) {
						this.mask = 1 << t | 0
					},
					enable: function (t) {
						this.mask |= 1 << t | 0
					},
					toggle: function (t) {
						this.mask ^= 1 << t | 0
					},
					disable: function (t) {
						this.mask &= ~(1 << t | 0)
					},
					test: function (t) {
						return 0 != (this.mask & t.mask)
					}
				});
				var co = 0;
				ht.DefaultUp = new a(0, 1, 0), ht.DefaultMatrixAutoUpdate = !0, Object.assign(ht.prototype, e.prototype, {
					isObject3D: !0,
					onBeforeRender: function () {},
					onAfterRender: function () {},
					applyMatrix: function (t) {
						this.matrix.multiplyMatrices(t, this.matrix), this.matrix.decompose(this.position, this.quaternion, this.scale)
					},
					applyQuaternion: function (t) {
						return this.quaternion.premultiply(t), this
					},
					setRotationFromAxisAngle: function (t, e) {
						this.quaternion.setFromAxisAngle(t, e)
					},
					setRotationFromEuler: function (t) {
						this.quaternion.setFromEuler(t, !0)
					},
					setRotationFromMatrix: function (t) {
						this.quaternion.setFromRotationMatrix(t)
					},
					setRotationFromQuaternion: function (t) {
						this.quaternion.copy(t)
					},
					rotateOnAxis: function () {
						var t = new r;
						return function (e, i) {
							return t.setFromAxisAngle(e, i), this.quaternion.multiply(t), this
						}
					}(),
					rotateOnWorldAxis: function () {
						var t = new r;
						return function (e, i) {
							return t.setFromAxisAngle(e, i), this.quaternion.premultiply(t), this
						}
					}(),
					rotateX: function () {
						var t = new a(1, 0, 0);
						return function (e) {
							return this.rotateOnAxis(t, e)
						}
					}(),
					rotateY: function () {
						var t = new a(0, 1, 0);
						return function (e) {
							return this.rotateOnAxis(t, e)
						}
					}(),
					rotateZ: function () {
						var t = new a(0, 0, 1);
						return function (e) {
							return this.rotateOnAxis(t, e)
						}
					}(),
					translateOnAxis: function () {
						var t = new a;
						return function (e, i) {
							return t.copy(e).applyQuaternion(this.quaternion), this.position.add(t.multiplyScalar(i)), this
						}
					}(),
					translateX: function () {
						var t = new a(1, 0, 0);
						return function (e) {
							return this.translateOnAxis(t, e)
						}
					}(),
					translateY: function () {
						var t = new a(0, 1, 0);
						return function (e) {
							return this.translateOnAxis(t, e)
						}
					}(),
					translateZ: function () {
						var t = new a(0, 0, 1);
						return function (e) {
							return this.translateOnAxis(t, e)
						}
					}(),
					localToWorld: function (t) {
						return t.applyMatrix4(this.matrixWorld)
					},
					worldToLocal: function () {
						var t = new n;
						return function (e) {
							return e.applyMatrix4(t.getInverse(this.matrixWorld))
						}
					}(),
					lookAt: function () {
						var t = new n,
							e = new a;
						return function (i, n, r) {
							i.isVector3 ? e.copy(i) : e.set(i, n, r), this.isCamera ? t.lookAt(this.position, e, this.up) : t.lookAt(e, this.position, this.up), this.quaternion.setFromRotationMatrix(t)
						}
					}(),
					add: function (t) {
						if (t && t.parent == this) return this;
						if (arguments.length > 1) {
							for (var e = 0; e < arguments.length; e++) this.add(arguments[e]);
							return this
						}
						return t === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", t), this) : (t && t.isObject3D ? (null !== t.parent && t.parent.remove(t), t.parent = this, t.dispatchEvent({
							type: "added"
						}), this.children.push(t)) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", t), this)
					},
					remove: function (t) {
						if (arguments.length > 1) {
							for (var e = 0; e < arguments.length; e++) this.remove(arguments[e]);
							return this
						}
						var i = this.children.indexOf(t);
						return -1 !== i && (t.parent = null, t.dispatchEvent({
							type: "removed"
						}), this.children.splice(i, 1)), this
					},
					getObjectById: function (t) {
						return this.getObjectByProperty("id", t)
					},
					getObjectByName: function (t) {
						return this.getObjectByProperty("name", t)
					},
					getObjectByProperty: function (t, e) {
						if (this[t] === e) return this;
						for (var i = 0, n = this.children.length; i < n; i++) {
							var r = this.children[i].getObjectByProperty(t, e);
							if (void 0 !== r) return r
						}
					},
					getWorldPosition: function (t) {
						var e = t || new a;
						return this.updateMatrixWorld(!0), e.setFromMatrixPosition(this.matrixWorld)
					},
					getWorldQuaternion: function () {
						var t = new a,
							e = new a;
						return function (i) {
							var n = i || new r;
							return this.updateMatrixWorld(!0), this.matrixWorld.decompose(t, n, e), n
						}
					}(),
					getWorldRotation: function () {
						var t = new r;
						return function (e) {
							var i = e || new ot;
							return this.getWorldQuaternion(t), i.setFromQuaternion(t, this.rotation.order, !1)
						}
					}(),
					getWorldScale: function () {
						var t = new a,
							e = new r;
						return function (i) {
							var n = i || new a;
							return this.updateMatrixWorld(!0), this.matrixWorld.decompose(t, e, n), n
						}
					}(),
					getWorldDirection: function () {
						var t = new r;
						return function (e) {
							var i = e || new a;
							return this.getWorldQuaternion(t), i.set(0, 0, 1).applyQuaternion(t)
						}
					}(),
					raycast: function () {},
					traverse: function (t) {
						t(this);
						for (var e = this.children, i = 0, n = e.length; i < n; i++) e[i].traverse(t)
					},
					traverseVisible: function (t) {
						if (!1 !== this.visible) {
							t(this);
							for (var e = this.children, i = 0, n = e.length; i < n; i++) e[i].traverseVisible(t)
						}
					},
					traverseAncestors: function (t) {
						var e = this.parent;
						null !== e && (t(e), e.traverseAncestors(t))
					},
					updateMatrix: function () {
						this.matrix.compose(this.position, this.quaternion, this.scale), this.matrixWorldNeedsUpdate = !0
					},
					updateMatrixWorld: function (t) {
						this.matrixAutoUpdate && this.updateMatrix(), (this.matrixWorldNeedsUpdate || t) && (null === this.parent ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix), this.matrixWorldNeedsUpdate = !1, t = !0);
						for (var e = this.children, i = 0, n = e.length; i < n; i++) e[i].updateMatrixWorld(t)
					},
					toJSON: function (t) {
						function e(e, i) {
							return void 0 === e[i.uuid] && (e[i.uuid] = i.toJSON(t)), i.uuid
						}

						function i(t) {
							var e = [];
							for (var i in t) {
								var n = t[i];
								delete n.metadata, e.push(n)
							}
							return e
						}
						var n = void 0 === t || "string" == typeof t,
							r = {};
						n && (t = {
							geometries: {},
							materials: {},
							textures: {},
							images: {}
						}, r.metadata = {
							version: 4.5,
							type: "Object",
							generator: "Object3D.toJSON"
						});
						var a = {};
						if (a.uuid = this.uuid, a.type = this.type, "" !== this.name && (a.name = this.name), !0 === this.castShadow && (a.castShadow = !0), !0 === this.receiveShadow && (a.receiveShadow = !0), !1 === this.visible && (a.visible = !1), "{}" !== JSON.stringify(this.userData) && (a.userData = this.userData), a.matrix = this.matrix.toArray(), void 0 !== this.geometry && (a.geometry = e(t.geometries, this.geometry)), void 0 !== this.material)
							if (Array.isArray(this.material)) {
								for (var o = [], s = 0, h = this.material.length; s < h; s++) o.push(e(t.materials, this.material[s]));
								a.material = o
							} else a.material = e(t.materials, this.material);
						if (this.children.length > 0) {
							a.children = [];
							for (s = 0; s < this.children.length; s++) a.children.push(this.children[s].toJSON(t).object)
						}
						if (n) {
							var l = i(t.geometries),
								c = i(t.materials),
								u = i(t.textures),
								d = i(t.images);
							l.length > 0 && (r.geometries = l), c.length > 0 && (r.materials = c), u.length > 0 && (r.textures = u), d.length > 0 && (r.images = d)
						}
						return r.object = a, r
					},
					clone: function (t) {
						return (new this.constructor).copy(this, t)
					},
					copy: function (t, e) {
						if (void 0 === e && (e = !0), this.name = t.name, this.up.copy(t.up), this.position.copy(t.position), this.quaternion.copy(t.quaternion), this.scale.copy(t.scale), this.matrix.copy(t.matrix), this.matrixWorld.copy(t.matrixWorld), this.matrixAutoUpdate = t.matrixAutoUpdate, this.matrixWorldNeedsUpdate = t.matrixWorldNeedsUpdate, this.layers.mask = t.layers.mask, this.visible = t.visible, this.castShadow = t.castShadow, this.receiveShadow = t.receiveShadow, this.frustumCulled = t.frustumCulled, this.renderOrder = t.renderOrder, this.userData = JSON.parse(JSON.stringify(t.userData)), !0 === e)
							for (var i = 0; i < t.children.length; i++) {
								var n = t.children[i];
								this.add(n.clone())
							}
						return this
					}
				}), lt.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: lt,
					isCamera: !0,
					copy: function (t, e) {
						return ht.prototype.copy.call(this, t, e), this.matrixWorldInverse.copy(t.matrixWorldInverse), this.projectionMatrix.copy(t.projectionMatrix), this
					},
					getWorldDirection: function () {
						var t = new r;
						return function (e) {
							var i = e || new a;
							return this.getWorldQuaternion(t), i.set(0, 0, -1).applyQuaternion(t)
						}
					}(),
					updateMatrixWorld: function (t) {
						ht.prototype.updateMatrixWorld.call(this, t), this.matrixWorldInverse.getInverse(this.matrixWorld)
					},
					clone: function () {
						return (new this.constructor).copy(this)
					}
				}), ct.prototype = Object.assign(Object.create(lt.prototype), {
					constructor: ct,
					isOrthographicCamera: !0,
					copy: function (t, e) {
						return lt.prototype.copy.call(this, t, e), this.left = t.left, this.right = t.right, this.top = t.top, this.bottom = t.bottom, this.near = t.near, this.far = t.far, this.zoom = t.zoom, this.view = null === t.view ? null : Object.assign({}, t.view), this
					},
					setViewOffset: function (t, e, i, n, r, a) {
						null === this.view && (this.view = {
							enabled: !0,
							fullWidth: 1,
							fullHeight: 1,
							offsetX: 0,
							offsetY: 0,
							width: 1,
							height: 1
						}), this.view.enabled = !0, this.view.fullWidth = t, this.view.fullHeight = e, this.view.offsetX = i, this.view.offsetY = n, this.view.width = r, this.view.height = a, this.updateProjectionMatrix()
					},
					clearViewOffset: function () {
						null !== this.view && (this.view.enabled = !1), this.updateProjectionMatrix()
					},
					updateProjectionMatrix: function () {
						var t = (this.right - this.left) / (2 * this.zoom),
							e = (this.top - this.bottom) / (2 * this.zoom),
							i = (this.right + this.left) / 2,
							n = (this.top + this.bottom) / 2,
							r = i - t,
							a = i + t,
							o = n + e,
							s = n - e;
						if (null !== this.view && this.view.enabled) {
							var h = this.zoom / (this.view.width / this.view.fullWidth),
								l = this.zoom / (this.view.height / this.view.fullHeight),
								c = (this.right - this.left) / this.view.width,
								u = (this.top - this.bottom) / this.view.height;
							a = (r += c * (this.view.offsetX / h)) + c * (this.view.width / h), s = (o -= u * (this.view.offsetY / l)) - u * (this.view.height / l)
						}
						this.projectionMatrix.makeOrthographic(r, a, o, s, this.near, this.far)
					},
					toJSON: function (t) {
						var e = ht.prototype.toJSON.call(this, t);
						return e.object.zoom = this.zoom, e.object.left = this.left, e.object.right = this.right, e.object.top = this.top, e.object.bottom = this.bottom, e.object.near = this.near, e.object.far = this.far, null !== this.view && (e.object.view = Object.assign({}, this.view)), e
					}
				}), Object.assign(ut.prototype, {
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						this.a = t.a, this.b = t.b, this.c = t.c, this.normal.copy(t.normal), this.color.copy(t.color), this.materialIndex = t.materialIndex;
						for (var e = 0, i = t.vertexNormals.length; e < i; e++) this.vertexNormals[e] = t.vertexNormals[e].clone();
						for (var e = 0, i = t.vertexColors.length; e < i; e++) this.vertexColors[e] = t.vertexColors[e].clone();
						return this
					}
				});
				var uo = 0;
				Object.assign(dt.prototype, e.prototype, {
					isGeometry: !0,
					applyMatrix: function (t) {
						for (var e = (new s).getNormalMatrix(t), i = 0, n = this.vertices.length; i < n; i++) {
							this.vertices[i].applyMatrix4(t)
						}
						for (var i = 0, n = this.faces.length; i < n; i++) {
							var r = this.faces[i];
							r.normal.applyMatrix3(e).normalize();
							for (var a = 0, o = r.vertexNormals.length; a < o; a++) r.vertexNormals[a].applyMatrix3(e).normalize()
						}
						return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this.verticesNeedUpdate = !0, this.normalsNeedUpdate = !0, this
					},
					rotateX: function () {
						var t = new n;
						return function (e) {
							return t.makeRotationX(e), this.applyMatrix(t), this
						}
					}(),
					rotateY: function () {
						var t = new n;
						return function (e) {
							return t.makeRotationY(e), this.applyMatrix(t), this
						}
					}(),
					rotateZ: function () {
						var t = new n;
						return function (e) {
							return t.makeRotationZ(e), this.applyMatrix(t), this
						}
					}(),
					translate: function () {
						var t = new n;
						return function (e, i, n) {
							return t.makeTranslation(e, i, n), this.applyMatrix(t), this
						}
					}(),
					scale: function () {
						var t = new n;
						return function (e, i, n) {
							return t.makeScale(e, i, n), this.applyMatrix(t), this
						}
					}(),
					lookAt: function () {
						var t = new ht;
						return function (e) {
							t.lookAt(e), t.updateMatrix(), this.applyMatrix(t.matrix)
						}
					}(),
					fromBufferGeometry: function (t) {
						function e(t, e, i, r) {
							var a = new ut(t, e, i, void 0 !== h ? [d[t].clone(), d[e].clone(), d[i].clone()] : [], void 0 !== l ? [n.colors[t].clone(), n.colors[e].clone(), n.colors[i].clone()] : [], r);
							n.faces.push(a), void 0 !== c && n.faceVertexUvs[0].push([f[t].clone(), f[e].clone(), f[i].clone()]), void 0 !== u && n.faceVertexUvs[1].push([p[t].clone(), p[e].clone(), p[i].clone()])
						}
						var n = this,
							r = null !== t.index ? t.index.array : void 0,
							o = t.attributes,
							s = o.position.array,
							h = void 0 !== o.normal ? o.normal.array : void 0,
							l = void 0 !== o.color ? o.color.array : void 0,
							c = void 0 !== o.uv ? o.uv.array : void 0,
							u = void 0 !== o.uv2 ? o.uv2.array : void 0;
						void 0 !== u && (this.faceVertexUvs[1] = []);
						for (var d = [], f = [], p = [], m = 0, g = 0; m < s.length; m += 3, g += 2) n.vertices.push(new a(s[m], s[m + 1], s[m + 2])), void 0 !== h && d.push(new a(h[m], h[m + 1], h[m + 2])), void 0 !== l && n.colors.push(new q(l[m], l[m + 1], l[m + 2])), void 0 !== c && f.push(new i(c[g], c[g + 1])), void 0 !== u && p.push(new i(u[g], u[g + 1]));
						var v = t.groups;
						if (v.length > 0)
							for (m = 0; m < v.length; m++)
								for (var y = v[m], b = y.start, g = b, x = b + y.count; g < x; g += 3) void 0 !== r ? e(r[g], r[g + 1], r[g + 2], y.materialIndex) : e(g, g + 1, g + 2, y.materialIndex);
						else if (void 0 !== r)
							for (m = 0; m < r.length; m += 3) e(r[m], r[m + 1], r[m + 2]);
						else
							for (m = 0; m < s.length / 3; m += 3) e(m, m + 1, m + 2);
						return this.computeFaceNormals(), null !== t.boundingBox && (this.boundingBox = t.boundingBox.clone()), null !== t.boundingSphere && (this.boundingSphere = t.boundingSphere.clone()), this
					},
					center: function () {
						this.computeBoundingBox();
						var t = this.boundingBox.getCenter().negate();
						return this.translate(t.x, t.y, t.z), t
					},
					normalize: function () {
						this.computeBoundingSphere();
						var t = this.boundingSphere.center,
							e = this.boundingSphere.radius,
							i = 0 === e ? 1 : 1 / e,
							r = new n;
						return r.set(i, 0, 0, -i * t.x, 0, i, 0, -i * t.y, 0, 0, i, -i * t.z, 0, 0, 0, 1), this.applyMatrix(r), this
					},
					computeFaceNormals: function () {
						for (var t = new a, e = new a, i = 0, n = this.faces.length; i < n; i++) {
							var r = this.faces[i],
								o = this.vertices[r.a],
								s = this.vertices[r.b],
								h = this.vertices[r.c];
							t.subVectors(h, s), e.subVectors(o, s), t.cross(e), t.normalize(), r.normal.copy(t)
						}
					},
					computeVertexNormals: function (t) {
						void 0 === t && (t = !0);
						var e, i, n, r, o, s;
						for (s = new Array(this.vertices.length), e = 0, i = this.vertices.length; e < i; e++) s[e] = new a;
						if (t) {
							var h, l, c, u = new a,
								d = new a;
							for (n = 0, r = this.faces.length; n < r; n++) o = this.faces[n], h = this.vertices[o.a], l = this.vertices[o.b], c = this.vertices[o.c], u.subVectors(c, l), d.subVectors(h, l), u.cross(d), s[o.a].add(u), s[o.b].add(u), s[o.c].add(u)
						} else
							for (this.computeFaceNormals(), n = 0, r = this.faces.length; n < r; n++) s[(o = this.faces[n]).a].add(o.normal), s[o.b].add(o.normal), s[o.c].add(o.normal);
						for (e = 0, i = this.vertices.length; e < i; e++) s[e].normalize();
						for (n = 0, r = this.faces.length; n < r; n++) {
							var f = (o = this.faces[n]).vertexNormals;
							3 === f.length ? (f[0].copy(s[o.a]), f[1].copy(s[o.b]), f[2].copy(s[o.c])) : (f[0] = s[o.a].clone(), f[1] = s[o.b].clone(), f[2] = s[o.c].clone())
						}
						this.faces.length > 0 && (this.normalsNeedUpdate = !0)
					},
					computeFlatVertexNormals: function () {
						var t, e, i;
						for (this.computeFaceNormals(), t = 0, e = this.faces.length; t < e; t++) {
							var n = (i = this.faces[t]).vertexNormals;
							3 === n.length ? (n[0].copy(i.normal), n[1].copy(i.normal), n[2].copy(i.normal)) : (n[0] = i.normal.clone(), n[1] = i.normal.clone(), n[2] = i.normal.clone())
						}
						this.faces.length > 0 && (this.normalsNeedUpdate = !0)
					},
					computeMorphNormals: function () {
						var t, e, i, n, r;
						for (i = 0, n = this.faces.length; i < n; i++)
							for ((r = this.faces[i]).__originalFaceNormal ? r.__originalFaceNormal.copy(r.normal) : r.__originalFaceNormal = r.normal.clone(), r.__originalVertexNormals || (r.__originalVertexNormals = []), t = 0, e = r.vertexNormals.length; t < e; t++) r.__originalVertexNormals[t] ? r.__originalVertexNormals[t].copy(r.vertexNormals[t]) : r.__originalVertexNormals[t] = r.vertexNormals[t].clone();
						var o = new dt;
						for (o.faces = this.faces, t = 0, e = this.morphTargets.length; t < e; t++) {
							if (!this.morphNormals[t]) {
								this.morphNormals[t] = {}, this.morphNormals[t].faceNormals = [], this.morphNormals[t].vertexNormals = [];
								var s = this.morphNormals[t].faceNormals,
									h = this.morphNormals[t].vertexNormals;
								for (i = 0, n = this.faces.length; i < n; i++) c = new a, u = {
									a: new a,
									b: new a,
									c: new a
								}, s.push(c), h.push(u)
							}
							var l = this.morphNormals[t];
							o.vertices = this.morphTargets[t].vertices, o.computeFaceNormals(), o.computeVertexNormals();
							var c, u;
							for (i = 0, n = this.faces.length; i < n; i++) r = this.faces[i], c = l.faceNormals[i], u = l.vertexNormals[i], c.copy(r.normal), u.a.copy(r.vertexNormals[0]), u.b.copy(r.vertexNormals[1]), u.c.copy(r.vertexNormals[2])
						}
						for (i = 0, n = this.faces.length; i < n; i++)(r = this.faces[i]).normal = r.__originalFaceNormal, r.vertexNormals = r.__originalVertexNormals
					},
					computeLineDistances: function () {
						for (var t = 0, e = this.vertices, i = 0, n = e.length; i < n; i++) i > 0 && (t += e[i].distanceTo(e[i - 1])), this.lineDistances[i] = t
					},
					computeBoundingBox: function () {
						null === this.boundingBox && (this.boundingBox = new tt), this.boundingBox.setFromPoints(this.vertices)
					},
					computeBoundingSphere: function () {
						null === this.boundingSphere && (this.boundingSphere = new et), this.boundingSphere.setFromPoints(this.vertices)
					},
					merge: function (t, e, i) {
						if (t && t.isGeometry) {
							var n, r = this.vertices.length,
								a = this.vertices,
								o = t.vertices,
								h = this.faces,
								l = t.faces,
								c = this.faceVertexUvs[0],
								u = t.faceVertexUvs[0],
								d = this.colors,
								f = t.colors;
							void 0 === i && (i = 0), void 0 !== e && (n = (new s).getNormalMatrix(e));
							for (var p = 0, m = o.length; p < m; p++) {
								var g = o[p].clone();
								void 0 !== e && g.applyMatrix4(e), a.push(g)
							}
							for (var p = 0, m = f.length; p < m; p++) d.push(f[p].clone());
							for (p = 0, m = l.length; p < m; p++) {
								var v, y, b, x = l[p],
									_ = x.vertexNormals,
									w = x.vertexColors;
								(v = new ut(x.a + r, x.b + r, x.c + r)).normal.copy(x.normal), void 0 !== n && v.normal.applyMatrix3(n).normalize();
								for (var M = 0, T = _.length; M < T; M++) y = _[M].clone(), void 0 !== n && y.applyMatrix3(n).normalize(), v.vertexNormals.push(y);
								v.color.copy(x.color);
								for (var M = 0, T = w.length; M < T; M++) b = w[M], v.vertexColors.push(b.clone());
								v.materialIndex = x.materialIndex + i, h.push(v)
							}
							for (p = 0, m = u.length; p < m; p++) {
								var S = u[p],
									E = [];
								if (void 0 !== S) {
									for (var M = 0, T = S.length; M < T; M++) E.push(S[M].clone());
									c.push(E)
								}
							}
						} else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.", t)
					},
					mergeMesh: function (t) {
						t && t.isMesh ? (t.matrixAutoUpdate && t.updateMatrix(), this.merge(t.geometry, t.matrix)) : console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.", t)
					},
					mergeVertices: function () {
						var t, e, i, n, r, a, o, s, h = {},
							l = [],
							c = [],
							u = Math.pow(10, 4);
						for (i = 0, n = this.vertices.length; i < n; i++) t = this.vertices[i], void 0 === h[e = Math.round(t.x * u) + "_" + Math.round(t.y * u) + "_" + Math.round(t.z * u)] ? (h[e] = i, l.push(this.vertices[i]), c[i] = l.length - 1) : c[i] = c[h[e]];
						var d = [];
						for (i = 0, n = this.faces.length; i < n; i++) {
							(r = this.faces[i]).a = c[r.a], r.b = c[r.b], r.c = c[r.c], a = [r.a, r.b, r.c];
							for (var f = 0; f < 3; f++)
								if (a[f] === a[(f + 1) % 3]) {
									d.push(i);
									break
								}
						}
						for (i = d.length - 1; i >= 0; i--) {
							var p = d[i];
							for (this.faces.splice(p, 1), o = 0, s = this.faceVertexUvs.length; o < s; o++) this.faceVertexUvs[o].splice(p, 1)
						}
						var m = this.vertices.length - l.length;
						return this.vertices = l, m
					},
					setFromPoints: function (t) {
						this.vertices = [];
						for (var e = 0, i = t.length; e < i; e++) {
							var n = t[e];
							this.vertices.push(new a(n.x, n.y, n.z || 0))
						}
						return this
					},
					sortFacesByMaterialIndex: function () {
						for (var t = this.faces, e = t.length, i = 0; i < e; i++) t[i]._id = i;
						t.sort(function (t, e) {
							return t.materialIndex - e.materialIndex
						});
						var n, r, a = this.faceVertexUvs[0],
							o = this.faceVertexUvs[1];
						a && a.length === e && (n = []), o && o.length === e && (r = []);
						for (i = 0; i < e; i++) {
							var s = t[i]._id;
							n && n.push(a[s]), r && r.push(o[s])
						}
						n && (this.faceVertexUvs[0] = n), r && (this.faceVertexUvs[1] = r)
					},
					toJSON: function () {
						function t(t, e, i) {
							return i ? t | 1 << e : t & ~(1 << e)
						}

						function e(t) {
							var e = t.x.toString() + t.y.toString() + t.z.toString();
							return void 0 !== d[e] ? d[e] : (d[e] = u.length / 3, u.push(t.x, t.y, t.z), d[e])
						}

						function i(t) {
							var e = t.r.toString() + t.g.toString() + t.b.toString();
							return void 0 !== p[e] ? p[e] : (p[e] = f.length, f.push(t.getHex()), p[e])
						}

						function n(t) {
							var e = t.x.toString() + t.y.toString();
							return void 0 !== g[e] ? g[e] : (g[e] = m.length / 2, m.push(t.x, t.y), g[e])
						}
						var r = {
							metadata: {
								version: 4.5,
								type: "Geometry",
								generator: "Geometry.toJSON"
							}
						};
						if (r.uuid = this.uuid, r.type = this.type, "" !== this.name && (r.name = this.name), void 0 !== this.parameters) {
							var a = this.parameters;
							for (var o in a) void 0 !== a[o] && (r[o] = a[o]);
							return r
						}
						for (var s = [], h = 0; h < this.vertices.length; h++) {
							var l = this.vertices[h];
							s.push(l.x, l.y, l.z)
						}
						for (var c = [], u = [], d = {}, f = [], p = {}, m = [], g = {}, h = 0; h < this.faces.length; h++) {
							var v = this.faces[h],
								y = void 0 !== this.faceVertexUvs[0][h],
								b = v.normal.length() > 0,
								x = v.vertexNormals.length > 0,
								_ = 1 !== v.color.r || 1 !== v.color.g || 1 !== v.color.b,
								w = v.vertexColors.length > 0,
								M = 0;
							if (M = t(M, 0, 0), M = t(M, 1, !0), M = t(M, 2, !1), M = t(M, 3, y), M = t(M, 4, b), M = t(M, 5, x), M = t(M, 6, _), M = t(M, 7, w), c.push(M), c.push(v.a, v.b, v.c), c.push(v.materialIndex), y) {
								var T = this.faceVertexUvs[0][h];
								c.push(n(T[0]), n(T[1]), n(T[2]))
							}
							if (b && c.push(e(v.normal)), x) {
								var S = v.vertexNormals;
								c.push(e(S[0]), e(S[1]), e(S[2]))
							}
							if (_ && c.push(i(v.color)), w) {
								var E = v.vertexColors;
								c.push(i(E[0]), i(E[1]), i(E[2]))
							}
						}
						return r.data = {}, r.data.vertices = s, r.data.normals = u, f.length > 0 && (r.data.colors = f), m.length > 0 && (r.data.uvs = [m]), r.data.faces = c, r
					},
					clone: function () {
						return (new dt).copy(this)
					},
					copy: function (t) {
						var e, i, n, r, a, o;
						this.vertices = [], this.colors = [], this.faces = [], this.faceVertexUvs = [
							[]
						], this.morphTargets = [], this.morphNormals = [], this.skinWeights = [], this.skinIndices = [], this.lineDistances = [], this.boundingBox = null, this.boundingSphere = null, this.name = t.name;
						var s = t.vertices;
						for (e = 0, i = s.length; e < i; e++) this.vertices.push(s[e].clone());
						var h = t.colors;
						for (e = 0, i = h.length; e < i; e++) this.colors.push(h[e].clone());
						var l = t.faces;
						for (e = 0, i = l.length; e < i; e++) this.faces.push(l[e].clone());
						for (e = 0, i = t.faceVertexUvs.length; e < i; e++) {
							var c = t.faceVertexUvs[e];
							for (void 0 === this.faceVertexUvs[e] && (this.faceVertexUvs[e] = []), n = 0, r = c.length; n < r; n++) {
								var u = c[n],
									d = [];
								for (a = 0, o = u.length; a < o; a++) {
									var f = u[a];
									d.push(f.clone())
								}
								this.faceVertexUvs[e].push(d)
							}
						}
						var p = t.morphTargets;
						for (e = 0, i = p.length; e < i; e++) {
							var m = {};
							if (m.name = p[e].name, void 0 !== p[e].vertices)
								for (m.vertices = [], n = 0, r = p[e].vertices.length; n < r; n++) m.vertices.push(p[e].vertices[n].clone());
							if (void 0 !== p[e].normals)
								for (m.normals = [], n = 0, r = p[e].normals.length; n < r; n++) m.normals.push(p[e].normals[n].clone());
							this.morphTargets.push(m)
						}
						var g = t.morphNormals;
						for (e = 0, i = g.length; e < i; e++) {
							var v = {};
							if (void 0 !== g[e].vertexNormals)
								for (v.vertexNormals = [], n = 0, r = g[e].vertexNormals.length; n < r; n++) {
									var y = g[e].vertexNormals[n],
										b = {};
									b.a = y.a.clone(), b.b = y.b.clone(), b.c = y.c.clone(), v.vertexNormals.push(b)
								}
							if (void 0 !== g[e].faceNormals)
								for (v.faceNormals = [], n = 0, r = g[e].faceNormals.length; n < r; n++) v.faceNormals.push(g[e].faceNormals[n].clone());
							this.morphNormals.push(v)
						}
						var x = t.skinWeights;
						for (e = 0, i = x.length; e < i; e++) this.skinWeights.push(x[e].clone());
						var _ = t.skinIndices;
						for (e = 0, i = _.length; e < i; e++) this.skinIndices.push(_[e].clone());
						var w = t.lineDistances;
						for (e = 0, i = w.length; e < i; e++) this.lineDistances.push(w[e]);
						var M = t.boundingBox;
						null !== M && (this.boundingBox = M.clone());
						var T = t.boundingSphere;
						return null !== T && (this.boundingSphere = T.clone()), this.elementsNeedUpdate = t.elementsNeedUpdate, this.verticesNeedUpdate = t.verticesNeedUpdate, this.uvsNeedUpdate = t.uvsNeedUpdate, this.normalsNeedUpdate = t.normalsNeedUpdate, this.colorsNeedUpdate = t.colorsNeedUpdate, this.lineDistancesNeedUpdate = t.lineDistancesNeedUpdate, this.groupsNeedUpdate = t.groupsNeedUpdate, this
					},
					dispose: function () {
						this.dispatchEvent({
							type: "dispose"
						})
					}
				}), Object.defineProperty(ft.prototype, "needsUpdate", {
					set: function (t) {
						!0 === t && this.version++
					}
				}), Object.assign(ft.prototype, {
					isBufferAttribute: !0,
					setArray: function (t) {
						if (Array.isArray(t)) throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
						this.count = void 0 !== t ? t.length / this.itemSize : 0, this.array = t
					},
					setDynamic: function (t) {
						return this.dynamic = t, this
					},
					copy: function (t) {
						return this.array = new t.array.constructor(t.array), this.itemSize = t.itemSize, this.count = t.count, this.normalized = t.normalized, this.dynamic = t.dynamic, this
					},
					copyAt: function (t, e, i) {
						t *= this.itemSize, i *= e.itemSize;
						for (var n = 0, r = this.itemSize; n < r; n++) this.array[t + n] = e.array[i + n];
						return this
					},
					copyArray: function (t) {
						return this.array.set(t), this
					},
					copyColorsArray: function (t) {
						for (var e = this.array, i = 0, n = 0, r = t.length; n < r; n++) {
							var a = t[n];
							void 0 === a && (console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined", n), a = new q), e[i++] = a.r, e[i++] = a.g, e[i++] = a.b
						}
						return this
					},
					copyIndicesArray: function (t) {
						for (var e = this.array, i = 0, n = 0, r = t.length; n < r; n++) {
							var a = t[n];
							e[i++] = a.a, e[i++] = a.b, e[i++] = a.c
						}
						return this
					},
					copyVector2sArray: function (t) {
						for (var e = this.array, n = 0, r = 0, a = t.length; r < a; r++) {
							var o = t[r];
							void 0 === o && (console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined", r), o = new i), e[n++] = o.x, e[n++] = o.y
						}
						return this
					},
					copyVector3sArray: function (t) {
						for (var e = this.array, i = 0, n = 0, r = t.length; n < r; n++) {
							var o = t[n];
							void 0 === o && (console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined", n), o = new a), e[i++] = o.x, e[i++] = o.y, e[i++] = o.z
						}
						return this
					},
					copyVector4sArray: function (t) {
						for (var e = this.array, i = 0, n = 0, r = t.length; n < r; n++) {
							var a = t[n];
							void 0 === a && (console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined", n), a = new l), e[i++] = a.x, e[i++] = a.y, e[i++] = a.z, e[i++] = a.w
						}
						return this
					},
					set: function (t, e) {
						return void 0 === e && (e = 0), this.array.set(t, e), this
					},
					getX: function (t) {
						return this.array[t * this.itemSize]
					},
					setX: function (t, e) {
						return this.array[t * this.itemSize] = e, this
					},
					getY: function (t) {
						return this.array[t * this.itemSize + 1]
					},
					setY: function (t, e) {
						return this.array[t * this.itemSize + 1] = e, this
					},
					getZ: function (t) {
						return this.array[t * this.itemSize + 2]
					},
					setZ: function (t, e) {
						return this.array[t * this.itemSize + 2] = e, this
					},
					getW: function (t) {
						return this.array[t * this.itemSize + 3]
					},
					setW: function (t, e) {
						return this.array[t * this.itemSize + 3] = e, this
					},
					setXY: function (t, e, i) {
						return t *= this.itemSize, this.array[t + 0] = e, this.array[t + 1] = i, this
					},
					setXYZ: function (t, e, i, n) {
						return t *= this.itemSize, this.array[t + 0] = e, this.array[t + 1] = i, this.array[t + 2] = n, this
					},
					setXYZW: function (t, e, i, n, r) {
						return t *= this.itemSize, this.array[t + 0] = e, this.array[t + 1] = i, this.array[t + 2] = n, this.array[t + 3] = r, this
					},
					onUpload: function (t) {
						return this.onUploadCallback = t, this
					},
					clone: function () {
						return new this.constructor(this.array, this.itemSize).copy(this)
					}
				}), (pt.prototype = Object.create(ft.prototype)).constructor = pt, (mt.prototype = Object.create(ft.prototype)).constructor = mt, (gt.prototype = Object.create(ft.prototype)).constructor = gt, (vt.prototype = Object.create(ft.prototype)).constructor = vt, (yt.prototype = Object.create(ft.prototype)).constructor = yt, (bt.prototype = Object.create(ft.prototype)).constructor = bt, (xt.prototype = Object.create(ft.prototype)).constructor = xt, (_t.prototype = Object.create(ft.prototype)).constructor = _t, (wt.prototype = Object.create(ft.prototype)).constructor = wt, Object.assign(Mt.prototype, {
					computeGroups: function (t) {
						for (var e, i = [], n = void 0, r = t.faces, a = 0; a < r.length; a++) {
							var o = r[a];
							o.materialIndex !== n && (n = o.materialIndex, void 0 !== e && (e.count = 3 * a - e.start, i.push(e)), e = {
								start: 3 * a,
								materialIndex: n
							})
						}
						void 0 !== e && (e.count = 3 * a - e.start, i.push(e)), this.groups = i
					},
					fromGeometry: function (t) {
						var e, n = t.faces,
							r = t.vertices,
							a = t.faceVertexUvs,
							o = a[0] && a[0].length > 0,
							s = a[1] && a[1].length > 0,
							h = t.morphTargets,
							l = h.length;
						if (l > 0) {
							e = [];
							for (v = 0; v < l; v++) e[v] = [];
							this.morphTargets.position = e
						}
						var c, u = t.morphNormals,
							d = u.length;
						if (d > 0) {
							c = [];
							for (v = 0; v < d; v++) c[v] = [];
							this.morphTargets.normal = c
						}
						for (var f = t.skinIndices, p = t.skinWeights, m = f.length === r.length, g = p.length === r.length, v = 0; v < n.length; v++) {
							var y = n[v];
							this.vertices.push(r[y.a], r[y.b], r[y.c]);
							var b = y.vertexNormals;
							if (3 === b.length) this.normals.push(b[0], b[1], b[2]);
							else {
								var x = y.normal;
								this.normals.push(x, x, x)
							}
							var _ = y.vertexColors;
							if (3 === _.length) this.colors.push(_[0], _[1], _[2]);
							else {
								var w = y.color;
								this.colors.push(w, w, w)
							}
							if (!0 === o) {
								void 0 !== (M = a[0][v]) ? this.uvs.push(M[0], M[1], M[2]) : (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ", v), this.uvs.push(new i, new i, new i))
							}
							if (!0 === s) {
								var M = a[1][v];
								void 0 !== M ? this.uvs2.push(M[0], M[1], M[2]) : (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", v), this.uvs2.push(new i, new i, new i))
							}
							for (S = 0; S < l; S++) {
								var T = h[S].vertices;
								e[S].push(T[y.a], T[y.b], T[y.c])
							}
							for (var S = 0; S < d; S++) {
								var E = u[S].vertexNormals[v];
								c[S].push(E.a, E.b, E.c)
							}
							m && this.skinIndices.push(f[y.a], f[y.b], f[y.c]), g && this.skinWeights.push(p[y.a], p[y.b], p[y.c])
						}
						return this.computeGroups(t), this.verticesNeedUpdate = t.verticesNeedUpdate, this.normalsNeedUpdate = t.normalsNeedUpdate, this.colorsNeedUpdate = t.colorsNeedUpdate, this.uvsNeedUpdate = t.uvsNeedUpdate, this.groupsNeedUpdate = t.groupsNeedUpdate, this
					}
				});
				var fo = 1;
				Object.assign(St.prototype, e.prototype, {
					isBufferGeometry: !0,
					getIndex: function () {
						return this.index
					},
					setIndex: function (t) {
						Array.isArray(t) ? this.index = new(Tt(t) > 65535 ? xt : yt)(t, 1) : this.index = t
					},
					addAttribute: function (t, e) {
						return e && e.isBufferAttribute || e && e.isInterleavedBufferAttribute ? "index" === t ? (console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."), void this.setIndex(e)) : (this.attributes[t] = e, this) : (console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."), void this.addAttribute(t, new ft(arguments[1], arguments[2])))
					},
					getAttribute: function (t) {
						return this.attributes[t]
					},
					removeAttribute: function (t) {
						return delete this.attributes[t], this
					},
					addGroup: function (t, e, i) {
						this.groups.push({
							start: t,
							count: e,
							materialIndex: void 0 !== i ? i : 0
						})
					},
					clearGroups: function () {
						this.groups = []
					},
					setDrawRange: function (t, e) {
						this.drawRange.start = t, this.drawRange.count = e
					},
					applyMatrix: function (t) {
						var e = this.attributes.position;
						void 0 !== e && (t.applyToBufferAttribute(e), e.needsUpdate = !0);
						var i = this.attributes.normal;
						if (void 0 !== i) {
							(new s).getNormalMatrix(t).applyToBufferAttribute(i), i.needsUpdate = !0
						}
						return null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this
					},
					rotateX: function () {
						var t = new n;
						return function (e) {
							return t.makeRotationX(e), this.applyMatrix(t), this
						}
					}(),
					rotateY: function () {
						var t = new n;
						return function (e) {
							return t.makeRotationY(e), this.applyMatrix(t), this
						}
					}(),
					rotateZ: function () {
						var t = new n;
						return function (e) {
							return t.makeRotationZ(e), this.applyMatrix(t), this
						}
					}(),
					translate: function () {
						var t = new n;
						return function (e, i, n) {
							return t.makeTranslation(e, i, n), this.applyMatrix(t), this
						}
					}(),
					scale: function () {
						var t = new n;
						return function (e, i, n) {
							return t.makeScale(e, i, n), this.applyMatrix(t), this
						}
					}(),
					lookAt: function () {
						var t = new ht;
						return function (e) {
							t.lookAt(e), t.updateMatrix(), this.applyMatrix(t.matrix)
						}
					}(),
					center: function () {
						this.computeBoundingBox();
						var t = this.boundingBox.getCenter().negate();
						return this.translate(t.x, t.y, t.z), t
					},
					setFromObject: function (t) {
						var e = t.geometry;
						if (t.isPoints || t.isLine) {
							var i = new _t(3 * e.vertices.length, 3),
								n = new _t(3 * e.colors.length, 3);
							if (this.addAttribute("position", i.copyVector3sArray(e.vertices)), this.addAttribute("color", n.copyColorsArray(e.colors)), e.lineDistances && e.lineDistances.length === e.vertices.length) {
								var r = new _t(e.lineDistances.length, 1);
								this.addAttribute("lineDistance", r.copyArray(e.lineDistances))
							}
							null !== e.boundingSphere && (this.boundingSphere = e.boundingSphere.clone()), null !== e.boundingBox && (this.boundingBox = e.boundingBox.clone())
						} else t.isMesh && e && e.isGeometry && this.fromGeometry(e);
						return this
					},
					setFromPoints: function (t) {
						for (var e = [], i = 0, n = t.length; i < n; i++) {
							var r = t[i];
							e.push(r.x, r.y, r.z || 0)
						}
						return this.addAttribute("position", new _t(e, 3)), this
					},
					updateFromObject: function (t) {
						var e = t.geometry;
						if (t.isMesh) {
							var i = e.__directGeometry;
							if (!0 === e.elementsNeedUpdate && (i = void 0, e.elementsNeedUpdate = !1), void 0 === i) return this.fromGeometry(e);
							i.verticesNeedUpdate = e.verticesNeedUpdate, i.normalsNeedUpdate = e.normalsNeedUpdate, i.colorsNeedUpdate = e.colorsNeedUpdate, i.uvsNeedUpdate = e.uvsNeedUpdate, i.groupsNeedUpdate = e.groupsNeedUpdate, e.verticesNeedUpdate = !1, e.normalsNeedUpdate = !1, e.colorsNeedUpdate = !1, e.uvsNeedUpdate = !1, e.groupsNeedUpdate = !1, e = i
						}
						var n;
						return !0 === e.verticesNeedUpdate && (void 0 !== (n = this.attributes.position) && (n.copyVector3sArray(e.vertices), n.needsUpdate = !0), e.verticesNeedUpdate = !1), !0 === e.normalsNeedUpdate && (void 0 !== (n = this.attributes.normal) && (n.copyVector3sArray(e.normals), n.needsUpdate = !0), e.normalsNeedUpdate = !1), !0 === e.colorsNeedUpdate && (void 0 !== (n = this.attributes.color) && (n.copyColorsArray(e.colors), n.needsUpdate = !0), e.colorsNeedUpdate = !1), e.uvsNeedUpdate && (void 0 !== (n = this.attributes.uv) && (n.copyVector2sArray(e.uvs), n.needsUpdate = !0), e.uvsNeedUpdate = !1), e.lineDistancesNeedUpdate && (void 0 !== (n = this.attributes.lineDistance) && (n.copyArray(e.lineDistances), n.needsUpdate = !0), e.lineDistancesNeedUpdate = !1), e.groupsNeedUpdate && (e.computeGroups(t.geometry), this.groups = e.groups, e.groupsNeedUpdate = !1), this
					},
					fromGeometry: function (t) {
						return t.__directGeometry = (new Mt).fromGeometry(t), this.fromDirectGeometry(t.__directGeometry)
					},
					fromDirectGeometry: function (t) {
						var e = new Float32Array(3 * t.vertices.length);
						if (this.addAttribute("position", new ft(e, 3).copyVector3sArray(t.vertices)), t.normals.length > 0) {
							var i = new Float32Array(3 * t.normals.length);
							this.addAttribute("normal", new ft(i, 3).copyVector3sArray(t.normals))
						}
						if (t.colors.length > 0) {
							var n = new Float32Array(3 * t.colors.length);
							this.addAttribute("color", new ft(n, 3).copyColorsArray(t.colors))
						}
						if (t.uvs.length > 0) {
							var r = new Float32Array(2 * t.uvs.length);
							this.addAttribute("uv", new ft(r, 2).copyVector2sArray(t.uvs))
						}
						if (t.uvs2.length > 0) {
							var a = new Float32Array(2 * t.uvs2.length);
							this.addAttribute("uv2", new ft(a, 2).copyVector2sArray(t.uvs2))
						}
						if (t.indices.length > 0) {
							var o = new(Tt(t.indices) > 65535 ? Uint32Array : Uint16Array)(3 * t.indices.length);
							this.setIndex(new ft(o, 1).copyIndicesArray(t.indices))
						}
						this.groups = t.groups;
						for (var s in t.morphTargets) {
							for (var h = [], l = t.morphTargets[s], c = 0, u = l.length; c < u; c++) {
								var d = l[c],
									f = new _t(3 * d.length, 3);
								h.push(f.copyVector3sArray(d))
							}
							this.morphAttributes[s] = h
						}
						if (t.skinIndices.length > 0) {
							var p = new _t(4 * t.skinIndices.length, 4);
							this.addAttribute("skinIndex", p.copyVector4sArray(t.skinIndices))
						}
						if (t.skinWeights.length > 0) {
							var m = new _t(4 * t.skinWeights.length, 4);
							this.addAttribute("skinWeight", m.copyVector4sArray(t.skinWeights))
						}
						return null !== t.boundingSphere && (this.boundingSphere = t.boundingSphere.clone()), null !== t.boundingBox && (this.boundingBox = t.boundingBox.clone()), this
					},
					computeBoundingBox: function () {
						null === this.boundingBox && (this.boundingBox = new tt);
						var t = this.attributes.position;
						void 0 !== t ? this.boundingBox.setFromBufferAttribute(t) : this.boundingBox.makeEmpty(), (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) && console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this)
					},
					computeBoundingSphere: function () {
						var t = new tt,
							e = new a;
						return function () {
							null === this.boundingSphere && (this.boundingSphere = new et);
							var i = this.attributes.position;
							if (i) {
								var n = this.boundingSphere.center;
								t.setFromBufferAttribute(i), t.getCenter(n);
								for (var r = 0, a = 0, o = i.count; a < o; a++) e.x = i.getX(a), e.y = i.getY(a), e.z = i.getZ(a), r = Math.max(r, n.distanceToSquared(e));
								this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this)
							}
						}
					}(),
					computeFaceNormals: function () {},
					computeVertexNormals: function () {
						var t = this.index,
							e = this.attributes,
							i = this.groups;
						if (e.position) {
							var n = e.position.array;
							if (void 0 === e.normal) this.addAttribute("normal", new ft(new Float32Array(n.length), 3));
							else
								for (var r = e.normal.array, o = 0, s = r.length; o < s; o++) r[o] = 0;
							var h, l, c, u = e.normal.array,
								d = new a,
								f = new a,
								p = new a,
								m = new a,
								g = new a;
							if (t) {
								var v = t.array;
								0 === i.length && this.addGroup(0, v.length);
								for (var y = 0, b = i.length; y < b; ++y)
									for (var x = i[y], _ = x.start, o = _, s = _ + x.count; o < s; o += 3) h = 3 * v[o + 0], l = 3 * v[o + 1], c = 3 * v[o + 2], d.fromArray(n, h), f.fromArray(n, l), p.fromArray(n, c), m.subVectors(p, f), g.subVectors(d, f), m.cross(g), u[h] += m.x, u[h + 1] += m.y, u[h + 2] += m.z, u[l] += m.x, u[l + 1] += m.y, u[l + 2] += m.z, u[c] += m.x, u[c + 1] += m.y, u[c + 2] += m.z
							} else
								for (var o = 0, s = n.length; o < s; o += 9) d.fromArray(n, o), f.fromArray(n, o + 3), p.fromArray(n, o + 6), m.subVectors(p, f), g.subVectors(d, f), m.cross(g), u[o] = m.x, u[o + 1] = m.y, u[o + 2] = m.z, u[o + 3] = m.x, u[o + 4] = m.y, u[o + 5] = m.z, u[o + 6] = m.x, u[o + 7] = m.y, u[o + 8] = m.z;
							this.normalizeNormals(), e.normal.needsUpdate = !0
						}
					},
					merge: function (t, e) {
						if (t && t.isBufferGeometry) {
							void 0 === e && (e = 0);
							var i = this.attributes;
							for (var n in i)
								if (void 0 !== t.attributes[n])
									for (var r = i[n].array, a = t.attributes[n], o = a.array, s = 0, h = a.itemSize * e; s < o.length; s++, h++) r[h] = o[s];
							return this
						}
						console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.", t)
					},
					normalizeNormals: function () {
						var t = new a;
						return function () {
							for (var e = this.attributes.normal, i = 0, n = e.count; i < n; i++) t.x = e.getX(i), t.y = e.getY(i), t.z = e.getZ(i), t.normalize(), e.setXYZ(i, t.x, t.y, t.z)
						}
					}(),
					toNonIndexed: function () {
						if (null === this.index) return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."), this;
						var t = new St,
							e = this.index.array,
							i = this.attributes;
						for (var n in i) {
							for (var r = i[n], a = r.array, o = r.itemSize, s = new a.constructor(e.length * o), h = 0, l = 0, c = 0, u = e.length; c < u; c++) {
								h = e[c] * o;
								for (var d = 0; d < o; d++) s[l++] = a[h++]
							}
							t.addAttribute(n, new ft(s, o))
						}
						return t
					},
					toJSON: function () {
						var t = {
							metadata: {
								version: 4.5,
								type: "BufferGeometry",
								generator: "BufferGeometry.toJSON"
							}
						};
						if (t.uuid = this.uuid, t.type = this.type, "" !== this.name && (t.name = this.name), void 0 !== this.parameters) {
							var e = this.parameters;
							for (var i in e) void 0 !== e[i] && (t[i] = e[i]);
							return t
						}
						t.data = {
							attributes: {}
						};
						var n = this.index;
						if (null !== n) {
							o = Array.prototype.slice.call(n.array);
							t.data.index = {
								type: n.array.constructor.name,
								array: o
							}
						}
						var r = this.attributes;
						for (var i in r) {
							var a = r[i],
								o = Array.prototype.slice.call(a.array);
							t.data.attributes[i] = {
								itemSize: a.itemSize,
								type: a.array.constructor.name,
								array: o,
								normalized: a.normalized
							}
						}
						var s = this.groups;
						s.length > 0 && (t.data.groups = JSON.parse(JSON.stringify(s)));
						var h = this.boundingSphere;
						return null !== h && (t.data.boundingSphere = {
							center: h.center.toArray(),
							radius: h.radius
						}), t
					},
					clone: function () {
						return (new St).copy(this)
					},
					copy: function (t) {
						var e, i, n;
						this.index = null, this.attributes = {}, this.morphAttributes = {}, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.name = t.name;
						var r = t.index;
						null !== r && this.setIndex(r.clone());
						var a = t.attributes;
						for (e in a) {
							var o = a[e];
							this.addAttribute(e, o.clone())
						}
						var s = t.morphAttributes;
						for (e in s) {
							var h = [],
								l = s[e];
							for (i = 0, n = l.length; i < n; i++) h.push(l[i].clone());
							this.morphAttributes[e] = h
						}
						var c = t.groups;
						for (i = 0, n = c.length; i < n; i++) {
							var u = c[i];
							this.addGroup(u.start, u.count, u.materialIndex)
						}
						var d = t.boundingBox;
						null !== d && (this.boundingBox = d.clone());
						var f = t.boundingSphere;
						return null !== f && (this.boundingSphere = f.clone()), this.drawRange.start = t.drawRange.start, this.drawRange.count = t.drawRange.count, this
					},
					dispose: function () {
						this.dispatchEvent({
							type: "dispose"
						})
					}
				}), (Et.prototype = Object.create(dt.prototype)).constructor = Et, (Ct.prototype = Object.create(St.prototype)).constructor = Ct, (Pt.prototype = Object.create(dt.prototype)).constructor = Pt, (kt.prototype = Object.create(St.prototype)).constructor = kt, (At.prototype = Object.create(dt.prototype)).constructor = At, (Lt.prototype = Object.create(St.prototype)).constructor = Lt, (Rt.prototype = Object.create(J.prototype)).constructor = Rt, Rt.prototype.isMeshBasicMaterial = !0, Rt.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.color.copy(t.color), this.map = t.map, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.specularMap = t.specularMap, this.alphaMap = t.alphaMap, this.envMap = t.envMap, this.combine = t.combine, this.reflectivity = t.reflectivity, this.refractionRatio = t.refractionRatio, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this
				}, (Ot.prototype = Object.create(J.prototype)).constructor = Ot, Ot.prototype.isShaderMaterial = !0, Ot.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.fragmentShader = t.fragmentShader, this.vertexShader = t.vertexShader, this.uniforms = oo.clone(t.uniforms), this.defines = t.defines, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.lights = t.lights, this.clipping = t.clipping, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this.extensions = t.extensions, this
				}, Ot.prototype.toJSON = function (t) {
					var e = J.prototype.toJSON.call(this, t);
					return e.uniforms = this.uniforms, e.vertexShader = this.vertexShader, e.fragmentShader = this.fragmentShader, e
				}, Object.assign(It.prototype, {
					set: function (t, e) {
						return this.origin.copy(t), this.direction.copy(e), this
					},
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.origin.copy(t.origin), this.direction.copy(t.direction), this
					},
					at: function (t, e) {
						return (e || new a).copy(this.direction).multiplyScalar(t).add(this.origin)
					},
					lookAt: function (t) {
						return this.direction.copy(t).sub(this.origin).normalize(), this
					},
					recast: function () {
						var t = new a;
						return function (e) {
							return this.origin.copy(this.at(e, t)), this
						}
					}(),
					closestPointToPoint: function (t, e) {
						var i = e || new a;
						i.subVectors(t, this.origin);
						var n = i.dot(this.direction);
						return n < 0 ? i.copy(this.origin) : i.copy(this.direction).multiplyScalar(n).add(this.origin)
					},
					distanceToPoint: function (t) {
						return Math.sqrt(this.distanceSqToPoint(t))
					},
					distanceSqToPoint: function () {
						var t = new a;
						return function (e) {
							var i = t.subVectors(e, this.origin).dot(this.direction);
							return i < 0 ? this.origin.distanceToSquared(e) : (t.copy(this.direction).multiplyScalar(i).add(this.origin), t.distanceToSquared(e))
						}
					}(),
					distanceSqToSegment: function () {
						var t = new a,
							e = new a,
							i = new a;
						return function (n, r, a, o) {
							t.copy(n).add(r).multiplyScalar(.5), e.copy(r).sub(n).normalize(), i.copy(this.origin).sub(t);
							var s, h, l, c, u = .5 * n.distanceTo(r),
								d = -this.direction.dot(e),
								f = i.dot(this.direction),
								p = -i.dot(e),
								m = i.lengthSq(),
								g = Math.abs(1 - d * d);
							if (g > 0)
								if (s = d * p - f, h = d * f - p, c = u * g, s >= 0)
									if (h >= -c)
										if (h <= c) {
											var v = 1 / g;
											l = (s *= v) * (s + d * (h *= v) + 2 * f) + h * (d * s + h + 2 * p) + m
										} else h = u, l = -(s = Math.max(0, -(d * h + f))) * s + h * (h + 2 * p) + m;
							else h = -u, l = -(s = Math.max(0, -(d * h + f))) * s + h * (h + 2 * p) + m;
							else h <= -c ? l = -(s = Math.max(0, -(-d * u + f))) * s + (h = s > 0 ? -u : Math.min(Math.max(-u, -p), u)) * (h + 2 * p) + m : h <= c ? (s = 0, l = (h = Math.min(Math.max(-u, -p), u)) * (h + 2 * p) + m) : l = -(s = Math.max(0, -(d * u + f))) * s + (h = s > 0 ? u : Math.min(Math.max(-u, -p), u)) * (h + 2 * p) + m;
							else h = d > 0 ? -u : u, l = -(s = Math.max(0, -(d * h + f))) * s + h * (h + 2 * p) + m;
							return a && a.copy(this.direction).multiplyScalar(s).add(this.origin), o && o.copy(e).multiplyScalar(h).add(t), l
						}
					}(),
					intersectSphere: function () {
						var t = new a;
						return function (e, i) {
							t.subVectors(e.center, this.origin);
							var n = t.dot(this.direction),
								r = t.dot(t) - n * n,
								a = e.radius * e.radius;
							if (r > a) return null;
							var o = Math.sqrt(a - r),
								s = n - o,
								h = n + o;
							return s < 0 && h < 0 ? null : s < 0 ? this.at(h, i) : this.at(s, i)
						}
					}(),
					intersectsSphere: function (t) {
						return this.distanceToPoint(t.center) <= t.radius
					},
					distanceToPlane: function (t) {
						var e = t.normal.dot(this.direction);
						if (0 === e) return 0 === t.distanceToPoint(this.origin) ? 0 : null;
						var i = -(this.origin.dot(t.normal) + t.constant) / e;
						return i >= 0 ? i : null
					},
					intersectPlane: function (t, e) {
						var i = this.distanceToPlane(t);
						return null === i ? null : this.at(i, e)
					},
					intersectsPlane: function (t) {
						var e = t.distanceToPoint(this.origin);
						if (0 === e) return !0;
						return t.normal.dot(this.direction) * e < 0
					},
					intersectBox: function (t, e) {
						var i, n, r, a, o, s, h = 1 / this.direction.x,
							l = 1 / this.direction.y,
							c = 1 / this.direction.z,
							u = this.origin;
						return h >= 0 ? (i = (t.min.x - u.x) * h, n = (t.max.x - u.x) * h) : (i = (t.max.x - u.x) * h, n = (t.min.x - u.x) * h), l >= 0 ? (r = (t.min.y - u.y) * l, a = (t.max.y - u.y) * l) : (r = (t.max.y - u.y) * l, a = (t.min.y - u.y) * l), i > a || r > n ? null : ((r > i || i != i) && (i = r), (a < n || n != n) && (n = a), c >= 0 ? (o = (t.min.z - u.z) * c, s = (t.max.z - u.z) * c) : (o = (t.max.z - u.z) * c, s = (t.min.z - u.z) * c), i > s || o > n ? null : ((o > i || i != i) && (i = o), (s < n || n != n) && (n = s), n < 0 ? null : this.at(i >= 0 ? i : n, e)))
					},
					intersectsBox: function () {
						var t = new a;
						return function (e) {
							return null !== this.intersectBox(e, t)
						}
					}(),
					intersectTriangle: function () {
						var t = new a,
							e = new a,
							i = new a,
							n = new a;
						return function (r, a, o, s, h) {
							e.subVectors(a, r), i.subVectors(o, r), n.crossVectors(e, i);
							var l, c = this.direction.dot(n);
							if (c > 0) {
								if (s) return null;
								l = 1
							} else {
								if (!(c < 0)) return null;
								l = -1, c = -c
							}
							t.subVectors(this.origin, r);
							var u = l * this.direction.dot(i.crossVectors(t, i));
							if (u < 0) return null;
							var d = l * this.direction.dot(e.cross(t));
							if (d < 0) return null;
							if (u + d > c) return null;
							var f = -l * t.dot(n);
							return f < 0 ? null : this.at(f / c, h)
						}
					}(),
					applyMatrix4: function (t) {
						return this.origin.applyMatrix4(t), this.direction.transformDirection(t), this
					},
					equals: function (t) {
						return t.origin.equals(this.origin) && t.direction.equals(this.direction)
					}
				}), Object.assign(Bt.prototype, {
					set: function (t, e) {
						return this.start.copy(t), this.end.copy(e), this
					},
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.start.copy(t.start), this.end.copy(t.end), this
					},
					getCenter: function (t) {
						return (t || new a).addVectors(this.start, this.end).multiplyScalar(.5)
					},
					delta: function (t) {
						return (t || new a).subVectors(this.end, this.start)
					},
					distanceSq: function () {
						return this.start.distanceToSquared(this.end)
					},
					distance: function () {
						return this.start.distanceTo(this.end)
					},
					at: function (t, e) {
						var i = e || new a;
						return this.delta(i).multiplyScalar(t).add(this.start)
					},
					closestPointToPointParameter: function () {
						var t = new a,
							e = new a;
						return function (i, n) {
							t.subVectors(i, this.start), e.subVectors(this.end, this.start);
							var r = e.dot(e),
								a = e.dot(t) / r;
							return n && (a = Ya.clamp(a, 0, 1)), a
						}
					}(),
					closestPointToPoint: function (t, e, i) {
						var n = this.closestPointToPointParameter(t, e),
							r = i || new a;
						return this.delta(r).multiplyScalar(n).add(this.start)
					},
					applyMatrix4: function (t) {
						return this.start.applyMatrix4(t), this.end.applyMatrix4(t), this
					},
					equals: function (t) {
						return t.start.equals(this.start) && t.end.equals(this.end)
					}
				}), Object.assign(Ut, {
					normal: function () {
						var t = new a;
						return function (e, i, n, r) {
							var o = r || new a;
							o.subVectors(n, i), t.subVectors(e, i), o.cross(t);
							var s = o.lengthSq();
							return s > 0 ? o.multiplyScalar(1 / Math.sqrt(s)) : o.set(0, 0, 0)
						}
					}(),
					barycoordFromPoint: function () {
						var t = new a,
							e = new a,
							i = new a;
						return function (n, r, o, s, h) {
							t.subVectors(s, r), e.subVectors(o, r), i.subVectors(n, r);
							var l = t.dot(t),
								c = t.dot(e),
								u = t.dot(i),
								d = e.dot(e),
								f = e.dot(i),
								p = l * d - c * c,
								m = h || new a;
							if (0 === p) return m.set(-2, -1, -1);
							var g = 1 / p,
								v = (d * u - c * f) * g,
								y = (l * f - c * u) * g;
							return m.set(1 - v - y, y, v)
						}
					}(),
					containsPoint: function () {
						var t = new a;
						return function (e, i, n, r) {
							var a = Ut.barycoordFromPoint(e, i, n, r, t);
							return a.x >= 0 && a.y >= 0 && a.x + a.y <= 1
						}
					}()
				}), Object.assign(Ut.prototype, {
					set: function (t, e, i) {
						return this.a.copy(t), this.b.copy(e), this.c.copy(i), this
					},
					setFromPointsAndIndices: function (t, e, i, n) {
						return this.a.copy(t[e]), this.b.copy(t[i]), this.c.copy(t[n]), this
					},
					clone: function () {
						return (new this.constructor).copy(this)
					},
					copy: function (t) {
						return this.a.copy(t.a), this.b.copy(t.b), this.c.copy(t.c), this
					},
					area: function () {
						var t = new a,
							e = new a;
						return function () {
							return t.subVectors(this.c, this.b), e.subVectors(this.a, this.b), .5 * t.cross(e).length()
						}
					}(),
					midpoint: function (t) {
						return (t || new a).addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3)
					},
					normal: function (t) {
						return Ut.normal(this.a, this.b, this.c, t)
					},
					plane: function (t) {
						return (t || new it).setFromCoplanarPoints(this.a, this.b, this.c)
					},
					barycoordFromPoint: function (t, e) {
						return Ut.barycoordFromPoint(t, this.a, this.b, this.c, e)
					},
					containsPoint: function (t) {
						return Ut.containsPoint(t, this.a, this.b, this.c)
					},
					closestPointToPoint: function () {
						var t = new it,
							e = [new Bt, new Bt, new Bt],
							i = new a,
							n = new a;
						return function (r, o) {
							var s = o || new a,
								h = 1 / 0;
							if (t.setFromCoplanarPoints(this.a, this.b, this.c), t.projectPoint(r, i), !0 === this.containsPoint(i)) s.copy(i);
							else {
								e[0].set(this.a, this.b), e[1].set(this.b, this.c), e[2].set(this.c, this.a);
								for (var l = 0; l < e.length; l++) {
									e[l].closestPointToPoint(i, !0, n);
									var c = i.distanceToSquared(n);
									c < h && (h = c, s.copy(n))
								}
							}
							return s
						}
					}(),
					equals: function (t) {
						return t.a.equals(this.a) && t.b.equals(this.b) && t.c.equals(this.c)
					}
				}), Dt.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: Dt,
					isMesh: !0,
					setDrawMode: function (t) {
						this.drawMode = t
					},
					copy: function (t) {
						return ht.prototype.copy.call(this, t), this.drawMode = t.drawMode, void 0 !== t.morphTargetInfluences && (this.morphTargetInfluences = t.morphTargetInfluences.slice()), void 0 !== t.morphTargetDictionary && (this.morphTargetDictionary = Object.assign({}, t.morphTargetDictionary)), this
					},
					updateMorphTargets: function () {
						var t, e, i, n = this.geometry;
						if (n.isBufferGeometry) {
							var r = n.morphAttributes,
								a = Object.keys(r);
							if (a.length > 0) {
								var o = r[a[0]];
								if (void 0 !== o)
									for (this.morphTargetInfluences = [], this.morphTargetDictionary = {}, t = 0, e = o.length; t < e; t++) i = o[t].name || String(t), this.morphTargetInfluences.push(0), this.morphTargetDictionary[i] = t
							}
						} else {
							var s = n.morphTargets;
							if (void 0 !== s && s.length > 0)
								for (this.morphTargetInfluences = [], this.morphTargetDictionary = {}, t = 0, e = s.length; t < e; t++) i = s[t].name || String(t), this.morphTargetInfluences.push(0), this.morphTargetDictionary[i] = t
						}
					},
					raycast: function () {
						function t(t, e, i, n, r, a, o) {
							return Ut.barycoordFromPoint(t, e, i, n, y), r.multiplyScalar(y.x), a.multiplyScalar(y.y), o.multiplyScalar(y.z), r.add(a).add(o), r.clone()
						}

						function e(t, e, i, n, r, a, o, s) {
							if (null === (e.side === er ? n.intersectTriangle(o, a, r, !0, s) : n.intersectTriangle(r, a, o, e.side !== ir, s))) return null;
							x.copy(s), x.applyMatrix4(t.matrixWorld);
							var h = i.ray.origin.distanceTo(x);
							return h < i.near || h > i.far ? null : {
								distance: h,
								point: x.clone(),
								object: t
							}
						}

						function r(i, n, r, a, o, s, h, d) {
							l.fromBufferAttribute(a, s), c.fromBufferAttribute(a, h), u.fromBufferAttribute(a, d);
							var f = e(i, i.material, n, r, l, c, u, b);
							return f && (o && (m.fromBufferAttribute(o, s), g.fromBufferAttribute(o, h), v.fromBufferAttribute(o, d), f.uv = t(b, l, c, u, m, g, v)), f.face = new ut(s, h, d, Ut.normal(l, c, u)), f.faceIndex = s), f
						}
						var o = new n,
							s = new It,
							h = new et,
							l = new a,
							c = new a,
							u = new a,
							d = new a,
							f = new a,
							p = new a,
							m = new i,
							g = new i,
							v = new i,
							y = new a,
							b = new a,
							x = new a;
						return function (i, n) {
							var a = this.geometry,
								y = this.material,
								x = this.matrixWorld;
							if (void 0 !== y && (null === a.boundingSphere && a.computeBoundingSphere(), h.copy(a.boundingSphere), h.applyMatrix4(x), !1 !== i.ray.intersectsSphere(h) && (o.getInverse(x), s.copy(i.ray).applyMatrix4(o), null === a.boundingBox || !1 !== s.intersectsBox(a.boundingBox)))) {
								var _;
								if (a.isBufferGeometry) {
									var w, M, T, S, E, C = a.index,
										P = a.attributes.position,
										k = a.attributes.uv;
									if (null !== C)
										for (S = 0, E = C.count; S < E; S += 3) w = C.getX(S), M = C.getX(S + 1), T = C.getX(S + 2), (_ = r(this, i, s, P, k, w, M, T)) && (_.faceIndex = Math.floor(S / 3), n.push(_));
									else if (void 0 !== P)
										for (S = 0, E = P.count; S < E; S += 3)(_ = r(this, i, s, P, k, w = S, M = S + 1, T = S + 2)) && (_.index = w, n.push(_))
								} else if (a.isGeometry) {
									var A, L, R, O, I = Array.isArray(y),
										B = a.vertices,
										U = a.faces,
										D = a.faceVertexUvs[0];
									D.length > 0 && (O = D);
									for (var z = 0, j = U.length; z < j; z++) {
										var N = U[z],
											F = I ? y[N.materialIndex] : y;
										if (void 0 !== F) {
											if (A = B[N.a], L = B[N.b], R = B[N.c], !0 === F.morphTargets) {
												var G = a.morphTargets,
													H = this.morphTargetInfluences;
												l.set(0, 0, 0), c.set(0, 0, 0), u.set(0, 0, 0);
												for (var V = 0, W = G.length; V < W; V++) {
													var q = H[V];
													if (0 !== q) {
														var X = G[V].vertices;
														l.addScaledVector(d.subVectors(X[N.a], A), q), c.addScaledVector(f.subVectors(X[N.b], L), q), u.addScaledVector(p.subVectors(X[N.c], R), q)
													}
												}
												l.add(A), c.add(L), u.add(R), A = l, L = c, R = u
											}
											if (_ = e(this, F, i, s, A, L, R, b)) {
												if (O && O[z]) {
													var K = O[z];
													m.copy(K[0]), g.copy(K[1]), v.copy(K[2]), _.uv = t(b, A, L, R, m, g, v)
												}
												_.face = N, _.faceIndex = z, n.push(_)
											}
										}
									}
								}
							}
						}
					}(),
					clone: function () {
						return new this.constructor(this.geometry, this.material).copy(this)
					}
				});
				var po = 0;
				$t.prototype = Object.assign(Object.create(lt.prototype), {
					constructor: $t,
					isPerspectiveCamera: !0,
					copy: function (t, e) {
						return lt.prototype.copy.call(this, t, e), this.fov = t.fov, this.zoom = t.zoom, this.near = t.near, this.far = t.far, this.focus = t.focus, this.aspect = t.aspect, this.view = null === t.view ? null : Object.assign({}, t.view), this.filmGauge = t.filmGauge, this.filmOffset = t.filmOffset, this
					},
					setFocalLength: function (t) {
						var e = .5 * this.getFilmHeight() / t;
						this.fov = 2 * Ya.RAD2DEG * Math.atan(e), this.updateProjectionMatrix()
					},
					getFocalLength: function () {
						var t = Math.tan(.5 * Ya.DEG2RAD * this.fov);
						return .5 * this.getFilmHeight() / t
					},
					getEffectiveFOV: function () {
						return 2 * Ya.RAD2DEG * Math.atan(Math.tan(.5 * Ya.DEG2RAD * this.fov) / this.zoom)
					},
					getFilmWidth: function () {
						return this.filmGauge * Math.min(this.aspect, 1)
					},
					getFilmHeight: function () {
						return this.filmGauge / Math.max(this.aspect, 1)
					},
					setViewOffset: function (t, e, i, n, r, a) {
						this.aspect = t / e, null === this.view && (this.view = {
							enabled: !0,
							fullWidth: 1,
							fullHeight: 1,
							offsetX: 0,
							offsetY: 0,
							width: 1,
							height: 1
						}), this.view.enabled = !0, this.view.fullWidth = t, this.view.fullHeight = e, this.view.offsetX = i, this.view.offsetY = n, this.view.width = r, this.view.height = a, this.updateProjectionMatrix()
					},
					clearViewOffset: function () {
						null !== this.view && (this.view.enabled = !1), this.updateProjectionMatrix()
					},
					updateProjectionMatrix: function () {
						var t = this.near,
							e = t * Math.tan(.5 * Ya.DEG2RAD * this.fov) / this.zoom,
							i = 2 * e,
							n = this.aspect * i,
							r = -.5 * n,
							a = this.view;
						if (null !== this.view && this.view.enabled) {
							var o = a.fullWidth,
								s = a.fullHeight;
							r += a.offsetX * n / o, e -= a.offsetY * i / s, n *= a.width / o, i *= a.height / s
						}
						var h = this.filmOffset;
						0 !== h && (r += t * h / this.getFilmWidth()), this.projectionMatrix.makePerspective(r, r + n, e, e - i, t, this.far)
					},
					toJSON: function (t) {
						var e = ht.prototype.toJSON.call(this, t);
						return e.object.fov = this.fov, e.object.zoom = this.zoom, e.object.near = this.near, e.object.far = this.far, e.object.focus = this.focus, e.object.aspect = this.aspect, null !== this.view && (e.object.view = Object.assign({}, this.view)), e.object.filmGauge = this.filmGauge, e.object.filmOffset = this.filmOffset, e
					}
				}), te.prototype = Object.assign(Object.create($t.prototype), {
					constructor: te,
					isArrayCamera: !0
				}), ne.prototype.isFogExp2 = !0, ne.prototype.clone = function () {
					return new ne(this.color.getHex(), this.density)
				}, ne.prototype.toJSON = function () {
					return {
						type: "FogExp2",
						color: this.color.getHex(),
						density: this.density
					}
				}, re.prototype.isFog = !0, re.prototype.clone = function () {
					return new re(this.color.getHex(), this.near, this.far)
				}, re.prototype.toJSON = function () {
					return {
						type: "Fog",
						color: this.color.getHex(),
						near: this.near,
						far: this.far
					}
				}, ae.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: ae,
					copy: function (t, e) {
						return ht.prototype.copy.call(this, t, e), null !== t.background && (this.background = t.background.clone()), null !== t.fog && (this.fog = t.fog.clone()), null !== t.overrideMaterial && (this.overrideMaterial = t.overrideMaterial.clone()), this.autoUpdate = t.autoUpdate, this.matrixAutoUpdate = t.matrixAutoUpdate, this
					},
					toJSON: function (t) {
						var e = ht.prototype.toJSON.call(this, t);
						return null !== this.background && (e.object.background = this.background.toJSON(t)), null !== this.fog && (e.object.fog = this.fog.toJSON()), e
					}
				}), oe.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: oe,
					isLensFlare: !0,
					copy: function (t) {
						ht.prototype.copy.call(this, t), this.positionScreen.copy(t.positionScreen), this.customUpdateCallback = t.customUpdateCallback;
						for (var e = 0, i = t.lensFlares.length; e < i; e++) this.lensFlares.push(t.lensFlares[e]);
						return this
					},
					add: function (t, e, i, n, r, a) {
						void 0 === e && (e = -1), void 0 === i && (i = 0), void 0 === a && (a = 1), void 0 === r && (r = new q(16777215)), void 0 === n && (n = sr), i = Math.min(i, Math.max(0, i)), this.lensFlares.push({
							texture: t,
							size: e,
							distance: i,
							x: 0,
							y: 0,
							z: 0,
							scale: 1,
							rotation: 0,
							opacity: a,
							color: r,
							blending: n
						})
					},
					updateLensFlares: function () {
						var t, e, i = this.lensFlares.length,
							n = 2 * -this.positionScreen.x,
							r = 2 * -this.positionScreen.y;
						for (t = 0; t < i; t++)(e = this.lensFlares[t]).x = this.positionScreen.x + n * e.distance, e.y = this.positionScreen.y + r * e.distance, e.wantedRotation = e.x * Math.PI * .25, e.rotation += .25 * (e.wantedRotation - e.rotation)
					}
				}), (se.prototype = Object.create(J.prototype)).constructor = se, se.prototype.isSpriteMaterial = !0, se.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.color.copy(t.color), this.map = t.map, this.rotation = t.rotation, this
				}, he.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: he,
					isSprite: !0,
					raycast: function () {
						var t = new a,
							e = new a,
							i = new a;
						return function (n, r) {
							e.setFromMatrixPosition(this.matrixWorld), n.ray.closestPointToPoint(e, t), i.setFromMatrixScale(this.matrixWorld);
							var a = i.x * i.y / 4;
							if (!(e.distanceToSquared(t) > a)) {
								var o = n.ray.origin.distanceTo(t);
								o < n.near || o > n.far || r.push({
									distance: o,
									point: t.clone(),
									face: null,
									object: this
								})
							}
						}
					}(),
					clone: function () {
						return new this.constructor(this.material).copy(this)
					}
				}), le.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: le,
					copy: function (t) {
						ht.prototype.copy.call(this, t, !1);
						for (var e = t.levels, i = 0, n = e.length; i < n; i++) {
							var r = e[i];
							this.addLevel(r.object.clone(), r.distance)
						}
						return this
					},
					addLevel: function (t, e) {
						void 0 === e && (e = 0), e = Math.abs(e);
						for (var i = this.levels, n = 0; n < i.length && !(e < i[n].distance); n++);
						i.splice(n, 0, {
							distance: e,
							object: t
						}), this.add(t)
					},
					getObjectForDistance: function (t) {
						for (var e = this.levels, i = 1, n = e.length; i < n && !(t < e[i].distance); i++);
						return e[i - 1].object
					},
					raycast: function () {
						var t = new a;
						return function (e, i) {
							t.setFromMatrixPosition(this.matrixWorld);
							var n = e.ray.origin.distanceTo(t);
							this.getObjectForDistance(n).raycast(e, i)
						}
					}(),
					update: function () {
						var t = new a,
							e = new a;
						return function (i) {
							var n = this.levels;
							if (n.length > 1) {
								t.setFromMatrixPosition(i.matrixWorld), e.setFromMatrixPosition(this.matrixWorld);
								var r = t.distanceTo(e);
								n[0].object.visible = !0;
								for (var a = 1, o = n.length; a < o && r >= n[a].distance; a++) n[a - 1].object.visible = !1, n[a].object.visible = !0;
								for (; a < o; a++) n[a].object.visible = !1
							}
						}
					}(),
					toJSON: function (t) {
						var e = ht.prototype.toJSON.call(this, t);
						e.object.levels = [];
						for (var i = this.levels, n = 0, r = i.length; n < r; n++) {
							var a = i[n];
							e.object.levels.push({
								object: a.object.uuid,
								distance: a.distance
							})
						}
						return e
					}
				}), Object.assign(ce.prototype, {
					calculateInverses: function () {
						this.boneInverses = [];
						for (var t = 0, e = this.bones.length; t < e; t++) {
							var i = new n;
							this.bones[t] && i.getInverse(this.bones[t].matrixWorld), this.boneInverses.push(i)
						}
					},
					pose: function () {
						var t, e, i;
						for (e = 0, i = this.bones.length; e < i; e++)(t = this.bones[e]) && t.matrixWorld.getInverse(this.boneInverses[e]);
						for (e = 0, i = this.bones.length; e < i; e++)(t = this.bones[e]) && (t.parent && t.parent.isBone ? (t.matrix.getInverse(t.parent.matrixWorld), t.matrix.multiply(t.matrixWorld)) : t.matrix.copy(t.matrixWorld), t.matrix.decompose(t.position, t.quaternion, t.scale))
					},
					update: function () {
						var t = new n,
							e = new n;
						return function () {
							for (var i = this.bones, n = this.boneInverses, r = this.boneMatrices, a = this.boneTexture, o = 0, s = i.length; o < s; o++) {
								var h = i[o] ? i[o].matrixWorld : e;
								t.multiplyMatrices(h, n[o]), t.toArray(r, 16 * o)
							}
							void 0 !== a && (a.needsUpdate = !0)
						}
					}(),
					clone: function () {
						return new ce(this.bones, this.boneInverses)
					}
				}), ue.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: ue,
					isBone: !0
				}), de.prototype = Object.assign(Object.create(Dt.prototype), {
					constructor: de,
					isSkinnedMesh: !0,
					initBones: function () {
						var t, e, i, n, r = [];
						if (this.geometry && void 0 !== this.geometry.bones) {
							for (i = 0, n = this.geometry.bones.length; i < n; i++) e = this.geometry.bones[i], t = new ue, r.push(t), t.name = e.name, t.position.fromArray(e.pos), t.quaternion.fromArray(e.rotq), void 0 !== e.scl && t.scale.fromArray(e.scl);
							for (i = 0, n = this.geometry.bones.length; i < n; i++) - 1 !== (e = this.geometry.bones[i]).parent && null !== e.parent && void 0 !== r[e.parent] ? r[e.parent].add(r[i]) : this.add(r[i])
						}
						return this.updateMatrixWorld(!0), r
					},
					bind: function (t, e) {
						this.skeleton = t, void 0 === e && (this.updateMatrixWorld(!0), this.skeleton.calculateInverses(), e = this.matrixWorld), this.bindMatrix.copy(e), this.bindMatrixInverse.getInverse(e)
					},
					pose: function () {
						this.skeleton.pose()
					},
					normalizeSkinWeights: function () {
						var t, e;
						if (this.geometry && this.geometry.isGeometry)
							for (e = 0; e < this.geometry.skinWeights.length; e++) {
								var i = this.geometry.skinWeights[e];
								(t = 1 / i.manhattanLength()) !== 1 / 0 ? i.multiplyScalar(t) : i.set(1, 0, 0, 0)
							} else if (this.geometry && this.geometry.isBufferGeometry) {
								var n = new l,
									r = this.geometry.attributes.skinWeight;
								for (e = 0; e < r.count; e++) n.x = r.getX(e), n.y = r.getY(e), n.z = r.getZ(e), n.w = r.getW(e), (t = 1 / n.manhattanLength()) !== 1 / 0 ? n.multiplyScalar(t) : n.set(1, 0, 0, 0), r.setXYZW(e, n.x, n.y, n.z, n.w)
							}
					},
					updateMatrixWorld: function (t) {
						Dt.prototype.updateMatrixWorld.call(this, t), "attached" === this.bindMode ? this.bindMatrixInverse.getInverse(this.matrixWorld) : "detached" === this.bindMode ? this.bindMatrixInverse.getInverse(this.bindMatrix) : console.warn("THREE.SkinnedMesh: Unrecognized bindMode: " + this.bindMode)
					},
					clone: function () {
						return new this.constructor(this.geometry, this.material).copy(this)
					}
				}), (fe.prototype = Object.create(J.prototype)).constructor = fe, fe.prototype.isLineBasicMaterial = !0, fe.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.color.copy(t.color), this.linewidth = t.linewidth, this.linecap = t.linecap, this.linejoin = t.linejoin, this
				}, pe.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: pe,
					isLine: !0,
					raycast: function () {
						var t = new n,
							e = new It,
							i = new et;
						return function (n, r) {
							var o = n.linePrecision,
								s = o * o,
								h = this.geometry,
								l = this.matrixWorld;
							if (null === h.boundingSphere && h.computeBoundingSphere(), i.copy(h.boundingSphere), i.applyMatrix4(l), !1 !== n.ray.intersectsSphere(i)) {
								t.getInverse(l), e.copy(n.ray).applyMatrix4(t);
								var c = new a,
									u = new a,
									d = new a,
									f = new a,
									p = this && this.isLineSegments ? 2 : 1;
								if (h.isBufferGeometry) {
									var m = h.index,
										g = h.attributes.position.array;
									if (null !== m)
										for (var v = m.array, y = 0, b = v.length - 1; y < b; y += p) {
											var x = v[y],
												_ = v[y + 1];
											c.fromArray(g, 3 * x), u.fromArray(g, 3 * _);
											if (!((T = e.distanceSqToSegment(c, u, f, d)) > s)) {
												f.applyMatrix4(this.matrixWorld);
												(S = n.ray.origin.distanceTo(f)) < n.near || S > n.far || r.push({
													distance: S,
													point: d.clone().applyMatrix4(this.matrixWorld),
													index: y,
													face: null,
													faceIndex: null,
													object: this
												})
											}
										} else
											for (var y = 0, b = g.length / 3 - 1; y < b; y += p) {
												c.fromArray(g, 3 * y), u.fromArray(g, 3 * y + 3);
												if (!((T = e.distanceSqToSegment(c, u, f, d)) > s)) {
													f.applyMatrix4(this.matrixWorld);
													(S = n.ray.origin.distanceTo(f)) < n.near || S > n.far || r.push({
														distance: S,
														point: d.clone().applyMatrix4(this.matrixWorld),
														index: y,
														face: null,
														faceIndex: null,
														object: this
													})
												}
											}
								} else if (h.isGeometry)
									for (var w = h.vertices, M = w.length, y = 0; y < M - 1; y += p) {
										var T = e.distanceSqToSegment(w[y], w[y + 1], f, d);
										if (!(T > s)) {
											f.applyMatrix4(this.matrixWorld);
											var S = n.ray.origin.distanceTo(f);
											S < n.near || S > n.far || r.push({
												distance: S,
												point: d.clone().applyMatrix4(this.matrixWorld),
												index: y,
												face: null,
												faceIndex: null,
												object: this
											})
										}
									}
							}
						}
					}(),
					clone: function () {
						return new this.constructor(this.geometry, this.material).copy(this)
					}
				}), me.prototype = Object.assign(Object.create(pe.prototype), {
					constructor: me,
					isLineSegments: !0
				}), ge.prototype = Object.assign(Object.create(pe.prototype), {
					constructor: ge,
					isLineLoop: !0
				}), (ve.prototype = Object.create(J.prototype)).constructor = ve, ve.prototype.isPointsMaterial = !0, ve.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.color.copy(t.color), this.map = t.map, this.size = t.size, this.sizeAttenuation = t.sizeAttenuation, this
				}, ye.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: ye,
					isPoints: !0,
					raycast: function () {
						var t = new n,
							e = new It,
							i = new et;
						return function (n, r) {
							function o(t, i) {
								var a = e.distanceSqToPoint(t);
								if (a < d) {
									var o = e.closestPointToPoint(t);
									o.applyMatrix4(l);
									var h = n.ray.origin.distanceTo(o);
									if (h < n.near || h > n.far) return;
									r.push({
										distance: h,
										distanceToRay: Math.sqrt(a),
										point: o.clone(),
										index: i,
										face: null,
										object: s
									})
								}
							}
							var s = this,
								h = this.geometry,
								l = this.matrixWorld,
								c = n.params.Points.threshold;
							if (null === h.boundingSphere && h.computeBoundingSphere(), i.copy(h.boundingSphere), i.applyMatrix4(l), i.radius += c, !1 !== n.ray.intersectsSphere(i)) {
								t.getInverse(l), e.copy(n.ray).applyMatrix4(t);
								var u = c / ((this.scale.x + this.scale.y + this.scale.z) / 3),
									d = u * u,
									f = new a;
								if (h.isBufferGeometry) {
									var p = h.index,
										m = h.attributes.position.array;
									if (null !== p)
										for (var g = p.array, v = 0, y = g.length; v < y; v++) {
											var b = g[v];
											f.fromArray(m, 3 * b), o(f, b)
										} else
											for (var v = 0, x = m.length / 3; v < x; v++) f.fromArray(m, 3 * v), o(f, v)
								} else
									for (var _ = h.vertices, v = 0, x = _.length; v < x; v++) o(_[v], v)
							}
						}
					}(),
					clone: function () {
						return new this.constructor(this.geometry, this.material).copy(this)
					}
				}), be.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: be
				}), (xe.prototype = Object.create(h.prototype)).constructor = xe, (_e.prototype = Object.create(h.prototype)).constructor = _e, _e.prototype.isCompressedTexture = !0, (we.prototype = Object.create(h.prototype)).constructor = we, we.prototype.isDepthTexture = !0, (Me.prototype = Object.create(dt.prototype)).constructor = Me, (Te.prototype = Object.create(St.prototype)).constructor = Te, (Se.prototype = Object.create(dt.prototype)).constructor = Se, (Ee.prototype = Object.create(St.prototype)).constructor = Ee, (Ce.prototype = Object.create(dt.prototype)).constructor = Ce, (Pe.prototype = Object.create(Ee.prototype)).constructor = Pe, (ke.prototype = Object.create(dt.prototype)).constructor = ke, (Ae.prototype = Object.create(Ee.prototype)).constructor = Ae, (Le.prototype = Object.create(dt.prototype)).constructor = Le, (Re.prototype = Object.create(Ee.prototype)).constructor = Re;
				var mo = {
					area: function (t) {
						for (var e = t.length, i = 0, n = e - 1, r = 0; r < e; n = r++) i += t[n].x * t[r].y - t[r].x * t[n].y;
						return .5 * i
					},
					triangulate: function () {
						function t(t, e, i, n, r, a) {
							var o, s, h, l, c, u, d, f, p;
							if (s = t[a[e]].x, h = t[a[e]].y, l = t[a[i]].x, c = t[a[i]].y, u = t[a[n]].x, d = t[a[n]].y, (l - s) * (d - h) - (c - h) * (u - s) <= 0) return !1;
							var m, g, v, y, b, x, _, w, M, T, S, E, C, P, k;
							for (m = u - l, g = d - c, v = s - u, y = h - d, b = l - s, x = c - h, o = 0; o < r; o++)
								if (f = t[a[o]].x, p = t[a[o]].y, !(f === s && p === h || f === l && p === c || f === u && p === d) && (_ = f - s, w = p - h, M = f - l, T = p - c, S = f - u, E = p - d, k = m * T - g * M, C = b * w - x * _, P = v * E - y * S, k >= -Number.EPSILON && P >= -Number.EPSILON && C >= -Number.EPSILON)) return !1;
							return !0
						}
						return function (e, i) {
							var n = e.length;
							if (n < 3) return null;
							var r, a, o, s = [],
								h = [],
								l = [];
							if (mo.area(e) > 0)
								for (a = 0; a < n; a++) h[a] = a;
							else
								for (a = 0; a < n; a++) h[a] = n - 1 - a;
							var c = n,
								u = 2 * c;
							for (a = c - 1; c > 2;) {
								if (u-- <= 0) return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"), i ? l : s;
								if (r = a, c <= r && (r = 0), a = r + 1, c <= a && (a = 0), o = a + 1, c <= o && (o = 0), t(e, r, a, o, c, h)) {
									var d, f, p, m, g;
									for (d = h[r], f = h[a], p = h[o], s.push([e[d], e[f], e[p]]), l.push([h[r], h[a], h[o]]), m = a, g = a + 1; g < c; m++, g++) h[m] = h[g];
									u = 2 * --c
								}
							}
							return i ? l : s
						}
					}(),
					triangulateShape: function (t, e) {
						function i(t) {
							var e = t.length;
							e > 2 && t[e - 1].equals(t[0]) && t.pop()
						}

						function n(t, e, i) {
							return t.x !== e.x ? t.x < e.x ? t.x <= i.x && i.x <= e.x : e.x <= i.x && i.x <= t.x : t.y < e.y ? t.y <= i.y && i.y <= e.y : e.y <= i.y && i.y <= t.y
						}

						function r(t, e, i, r, a) {
							var o = e.x - t.x,
								s = e.y - t.y,
								h = r.x - i.x,
								l = r.y - i.y,
								c = t.x - i.x,
								u = t.y - i.y,
								d = s * h - o * l,
								f = s * c - o * u;
							if (Math.abs(d) > Number.EPSILON) {
								var p;
								if (d > 0) {
									if (f < 0 || f > d) return [];
									if ((p = l * c - h * u) < 0 || p > d) return []
								} else {
									if (f > 0 || f < d) return [];
									if ((p = l * c - h * u) > 0 || p < d) return []
								}
								if (0 === p) return !a || 0 !== f && f !== d ? [t] : [];
								if (p === d) return !a || 0 !== f && f !== d ? [e] : [];
								if (0 === f) return [i];
								if (f === d) return [r];
								var m = p / d;
								return [{
									x: t.x + m * o,
									y: t.y + m * s
								}]
							}
							if (0 !== f || l * c != h * u) return [];
							var g = 0 === o && 0 === s,
								v = 0 === h && 0 === l;
							if (g && v) return t.x !== i.x || t.y !== i.y ? [] : [t];
							if (g) return n(i, r, t) ? [t] : [];
							if (v) return n(t, e, i) ? [i] : [];
							var y, b, x, _, w, M, T, S;
							return 0 !== o ? (t.x < e.x ? (y = t, x = t.x, b = e, _ = e.x) : (y = e, x = e.x, b = t, _ = t.x), i.x < r.x ? (w = i, T = i.x, M = r, S = r.x) : (w = r, T = r.x, M = i, S = i.x)) : (t.y < e.y ? (y = t, x = t.y, b = e, _ = e.y) : (y = e, x = e.y, b = t, _ = t.y), i.y < r.y ? (w = i, T = i.y, M = r, S = r.y) : (w = r, T = r.y, M = i, S = i.y)), x <= T ? _ < T ? [] : _ === T ? a ? [] : [w] : _ <= S ? [w, b] : [w, M] : x > S ? [] : x === S ? a ? [] : [y] : _ <= S ? [y, b] : [y, M]
						}

						function a(t, e, i, n) {
							var r = e.x - t.x,
								a = e.y - t.y,
								o = i.x - t.x,
								s = i.y - t.y,
								h = n.x - t.x,
								l = n.y - t.y,
								c = r * s - a * o,
								u = r * l - a * h;
							if (Math.abs(c) > Number.EPSILON) {
								var d = h * s - l * o;
								return c > 0 ? u >= 0 && d >= 0 : u >= 0 || d >= 0
							}
							return u > 0
						}
						i(t), e.forEach(i);
						for (var o, s, h, l, c, u, d = {}, f = t.concat(), p = 0, m = e.length; p < m; p++) Array.prototype.push.apply(f, e[p]);
						for (o = 0, s = f.length; o < s; o++) void 0 !== d[c = f[o].x + ":" + f[o].y] && console.warn("THREE.ShapeUtils: Duplicate point", c, o), d[c] = o;
						var g = function (t, e) {
								function i(t, e) {
									var i = y.length - 1,
										n = t - 1;
									n < 0 && (n = i);
									var r = t + 1;
									r > i && (r = 0);
									var o = a(y[t], y[n], y[r], s[e]);
									if (!o) return !1;
									var h = s.length - 1,
										l = e - 1;
									l < 0 && (l = h);
									var c = e + 1;
									return c > h && (c = 0), !!(o = a(s[e], s[l], s[c], y[t]))
								}

								function n(t, e) {
									var i, n;
									for (i = 0; i < y.length; i++)
										if (n = i + 1, n %= y.length, r(t, e, y[i], y[n], !0).length > 0) return !0;
									return !1
								}

								function o(t, i) {
									var n, a, o, s;
									for (n = 0; n < b.length; n++)
										for (a = e[b[n]], o = 0; o < a.length; o++)
											if (s = o + 1, s %= a.length, r(t, i, a[o], a[s], !0).length > 0) return !0;
									return !1
								}
								for (var s, h, l, c, u, d, f, p, m, g, v, y = t.concat(), b = [], x = [], _ = 0, w = e.length; _ < w; _++) b.push(_);
								for (var M = 0, T = 2 * b.length; b.length > 0;) {
									if (--T < 0) {
										console.log('THREE.ShapeUtils: Infinite Loop! Holes left:" + indepHoles.length + ", Probably Hole outside Shape!');
										break
									}
									for (l = M; l < y.length; l++) {
										for (c = y[l], h = -1, _ = 0; _ < b.length; _++)
											if (d = b[_], f = c.x + ":" + c.y + ":" + d, void 0 === x[f]) {
												s = e[d];
												for (var S = 0; S < s.length; S++)
													if (u = s[S], i(l, S) && !n(c, u) && !o(c, u)) {
														h = S, b.splice(_, 1), p = y.slice(0, l + 1), m = y.slice(l), g = s.slice(h), v = s.slice(0, h + 1), y = p.concat(g).concat(v).concat(m), M = l;
														break
													}
												if (h >= 0) break;
												x[f] = !0
											}
										if (h >= 0) break
									}
								}
								return y
							}(t, e),
							v = mo.triangulate(g, !1);
						for (o = 0, s = v.length; o < s; o++)
							for (l = v[o], h = 0; h < 3; h++) void 0 !== (u = d[c = l[h].x + ":" + l[h].y]) && (l[h] = u);
						return v.concat()
					},
					isClockWise: function (t) {
						return mo.area(t) < 0
					}
				};
				(Oe.prototype = Object.create(dt.prototype)).constructor = Oe, (Ie.prototype = Object.create(St.prototype)).constructor = Ie, Ie.prototype.getArrays = function () {
					var t = this.getAttribute("position"),
						e = t ? Array.prototype.slice.call(t.array) : [],
						i = this.getAttribute("uv"),
						n = i ? Array.prototype.slice.call(i.array) : [],
						r = this.index;
					return {
						position: e,
						uv: n,
						index: r ? Array.prototype.slice.call(r.array) : []
					}
				}, Ie.prototype.addShapeList = function (t, e) {
					var i = t.length;
					e.arrays = this.getArrays();
					for (var n = 0; n < i; n++) {
						var r = t[n];
						this.addShape(r, e)
					}
					this.setIndex(e.arrays.index), this.addAttribute("position", new _t(e.arrays.position, 3)), this.addAttribute("uv", new _t(e.arrays.uv, 2))
				}, Ie.prototype.addShape = function (t, e) {
					function n(t, e, i) {
						return e || console.error("THREE.ExtrudeGeometry: vec does not exist"), e.clone().multiplyScalar(i).add(t)
					}

					function r(t, e, n) {
						var r, a, o, s = t.x - e.x,
							h = t.y - e.y,
							l = n.x - t.x,
							c = n.y - t.y,
							u = s * s + h * h,
							d = s * c - h * l;
						if (Math.abs(d) > Number.EPSILON) {
							var f = Math.sqrt(u),
								p = Math.sqrt(l * l + c * c),
								m = e.x - h / f,
								g = e.y + s / f,
								v = ((n.x - c / p - m) * c - (n.y + l / p - g) * l) / (s * c - h * l),
								y = (r = m + s * v - t.x) * r + (a = g + h * v - t.y) * a;
							if (y <= 2) return new i(r, a);
							o = Math.sqrt(y / 2)
						} else {
							var b = !1;
							s > Number.EPSILON ? l > Number.EPSILON && (b = !0) : s < -Number.EPSILON ? l < -Number.EPSILON && (b = !0) : Math.sign(h) === Math.sign(c) && (b = !0), b ? (r = -h, a = s, o = Math.sqrt(u)) : (r = s, a = h, o = Math.sqrt(u / 2))
						}
						return new i(r / o, a / o)
					}

					function o(t, e) {
						var i, n;
						for (Y = t.length; --Y >= 0;) {
							i = Y, (n = Y - 1) < 0 && (n = t.length - 1);
							var r = 0,
								a = C + 2 * T;
							for (r = 0; r < a; r++) {
								var o = q * r,
									s = q * (r + 1);
								! function (t, e, i, n) {
									l(t), l(e), l(n), l(e), l(i), l(n);
									var r = v.length / 3,
										a = A.generateSideWallUV(I, v, r - 6, r - 3, r - 2, r - 1);
									c(a[0]), c(a[1]), c(a[3]), c(a[1]), c(a[2]), c(a[3])
								}(e + i + o, e + n + o, e + n + s, e + i + s)
							}
						}
					}

					function s(t, e, i) {
						x.push(t), x.push(e), x.push(i)
					}

					function h(t, e, i) {
						l(t), l(e), l(i);
						var n = v.length / 3,
							r = A.generateTopUV(I, v, n - 3, n - 2, n - 1);
						c(r[0]), c(r[1]), c(r[2])
					}

					function l(t) {
						y.push(v.length / 3), v.push(x[3 * t + 0]), v.push(x[3 * t + 1]), v.push(x[3 * t + 2])
					}

					function c(t) {
						b.push(t.x), b.push(t.y)
					}
					var u, d, f, p, m, g = e.arrays ? e.arrays : this.getArrays(),
						v = g.position,
						y = g.index,
						b = g.uv,
						x = [],
						_ = void 0 !== e.amount ? e.amount : 100,
						w = void 0 !== e.bevelThickness ? e.bevelThickness : 6,
						M = void 0 !== e.bevelSize ? e.bevelSize : w - 2,
						T = void 0 !== e.bevelSegments ? e.bevelSegments : 3,
						S = void 0 === e.bevelEnabled || e.bevelEnabled,
						E = void 0 !== e.curveSegments ? e.curveSegments : 12,
						C = void 0 !== e.steps ? e.steps : 1,
						P = e.extrudePath,
						k = !1,
						A = void 0 !== e.UVGenerator ? e.UVGenerator : Oe.WorldUVGenerator;
					P && (u = P.getSpacedPoints(C), k = !0, S = !1, d = void 0 !== e.frames ? e.frames : P.computeFrenetFrames(C, !1), f = new a, p = new a, m = new a), S || (T = 0, w = 0, M = 0);
					var L, R, O, I = this,
						B = t.extractPoints(E),
						U = B.shape,
						D = B.holes;
					if (!mo.isClockWise(U))
						for (U = U.reverse(), R = 0, O = D.length; R < O; R++) L = D[R], mo.isClockWise(L) && (D[R] = L.reverse());
					var z = mo.triangulateShape(U, D),
						j = U;
					for (R = 0, O = D.length; R < O; R++) L = D[R], U = U.concat(L);
					for (var N, F, G, H, V, W, q = U.length, X = z.length, K = [], Y = 0, Z = j.length, J = Z - 1, Q = Y + 1; Y < Z; Y++, J++, Q++) J === Z && (J = 0), Q === Z && (Q = 0), K[Y] = r(j[Y], j[J], j[Q]);
					var $, tt = [],
						et = K.concat();
					for (R = 0, O = D.length; R < O; R++) {
						for (L = D[R], $ = [], Y = 0, J = (Z = L.length) - 1, Q = Y + 1; Y < Z; Y++, J++, Q++) J === Z && (J = 0), Q === Z && (Q = 0), $[Y] = r(L[Y], L[J], L[Q]);
						tt.push($), et = et.concat($)
					}
					for (N = 0; N < T; N++) {
						for (G = N / T, H = w * Math.cos(G * Math.PI / 2), F = M * Math.sin(G * Math.PI / 2), Y = 0, Z = j.length; Y < Z; Y++) s((V = n(j[Y], K[Y], F)).x, V.y, -H);
						for (R = 0, O = D.length; R < O; R++)
							for (L = D[R], $ = tt[R], Y = 0, Z = L.length; Y < Z; Y++) s((V = n(L[Y], $[Y], F)).x, V.y, -H)
					}
					for (F = M, Y = 0; Y < q; Y++) V = S ? n(U[Y], et[Y], F) : U[Y], k ? (p.copy(d.normals[0]).multiplyScalar(V.x), f.copy(d.binormals[0]).multiplyScalar(V.y), m.copy(u[0]).add(p).add(f), s(m.x, m.y, m.z)) : s(V.x, V.y, 0);
					var it;
					for (it = 1; it <= C; it++)
						for (Y = 0; Y < q; Y++) V = S ? n(U[Y], et[Y], F) : U[Y], k ? (p.copy(d.normals[it]).multiplyScalar(V.x), f.copy(d.binormals[it]).multiplyScalar(V.y), m.copy(u[it]).add(p).add(f), s(m.x, m.y, m.z)) : s(V.x, V.y, _ / C * it);
					for (N = T - 1; N >= 0; N--) {
						for (G = N / T, H = w * Math.cos(G * Math.PI / 2), F = M * Math.sin(G * Math.PI / 2), Y = 0, Z = j.length; Y < Z; Y++) s((V = n(j[Y], K[Y], F)).x, V.y, _ + H);
						for (R = 0, O = D.length; R < O; R++)
							for (L = D[R], $ = tt[R], Y = 0, Z = L.length; Y < Z; Y++) V = n(L[Y], $[Y], F), k ? s(V.x, V.y + u[C - 1].y, u[C - 1].x + H) : s(V.x, V.y, _ + H)
					}! function () {
						var t = v.length / 3;
						if (S) {
							var i = 0,
								n = q * i;
							for (Y = 0; Y < X; Y++) h((W = z[Y])[2] + n, W[1] + n, W[0] + n);
							for (n = q * (i = C + 2 * T), Y = 0; Y < X; Y++) h((W = z[Y])[0] + n, W[1] + n, W[2] + n)
						} else {
							for (Y = 0; Y < X; Y++) h((W = z[Y])[2], W[1], W[0]);
							for (Y = 0; Y < X; Y++) h((W = z[Y])[0] + q * C, W[1] + q * C, W[2] + q * C)
						}
						I.addGroup(t, v.length / 3 - t, void 0 !== e.material ? e.material : 0)
					}(),
					function () {
						var t = v.length / 3,
							i = 0;
						for (o(j, i), i += j.length, R = 0, O = D.length; R < O; R++) o(L = D[R], i), i += L.length;
						I.addGroup(t, v.length / 3 - t, void 0 !== e.extrudeMaterial ? e.extrudeMaterial : 1)
					}(), e.arrays || (this.setIndex(y), this.addAttribute("position", new _t(v, 3)), this.addAttribute("uv", new _t(e.arrays.uv, 2)))
				}, Oe.WorldUVGenerator = {
					generateTopUV: function (t, e, n, r, a) {
						var o = e[3 * n],
							s = e[3 * n + 1],
							h = e[3 * r],
							l = e[3 * r + 1],
							c = e[3 * a],
							u = e[3 * a + 1];
						return [new i(o, s), new i(h, l), new i(c, u)]
					},
					generateSideWallUV: function (t, e, n, r, a, o) {
						var s = e[3 * n],
							h = e[3 * n + 1],
							l = e[3 * n + 2],
							c = e[3 * r],
							u = e[3 * r + 1],
							d = e[3 * r + 2],
							f = e[3 * a],
							p = e[3 * a + 1],
							m = e[3 * a + 2],
							g = e[3 * o],
							v = e[3 * o + 1],
							y = e[3 * o + 2];
						return Math.abs(h - u) < .01 ? [new i(s, 1 - l), new i(c, 1 - d), new i(f, 1 - m), new i(g, 1 - y)] : [new i(h, 1 - l), new i(u, 1 - d), new i(p, 1 - m), new i(v, 1 - y)]
					}
				}, (Be.prototype = Object.create(dt.prototype)).constructor = Be, (Ue.prototype = Object.create(Ie.prototype)).constructor = Ue, (De.prototype = Object.create(dt.prototype)).constructor = De, (ze.prototype = Object.create(St.prototype)).constructor = ze, (je.prototype = Object.create(dt.prototype)).constructor = je, (Ne.prototype = Object.create(St.prototype)).constructor = Ne, (Fe.prototype = Object.create(dt.prototype)).constructor = Fe, (Ge.prototype = Object.create(St.prototype)).constructor = Ge, (He.prototype = Object.create(Fe.prototype)).constructor = He, (Ve.prototype = Object.create(Ge.prototype)).constructor = Ve, (We.prototype = Object.create(dt.prototype)).constructor = We, (qe.prototype = Object.create(St.prototype)).constructor = qe;
				var go = Object.freeze({
					ParametricGeometry: Me,
					ParametricBufferGeometry: Te,
					TetrahedronGeometry: Ce,
					TetrahedronBufferGeometry: Pe,
					OctahedronGeometry: ke,
					OctahedronBufferGeometry: Ae,
					IcosahedronGeometry: Le,
					IcosahedronBufferGeometry: Re,
					PolyhedronGeometry: Se,
					PolyhedronBufferGeometry: Ee,
					TextGeometry: Be,
					TextBufferGeometry: Ue,
					SphereGeometry: De,
					SphereBufferGeometry: ze,
					RingGeometry: je,
					RingBufferGeometry: Ne,
					PlaneGeometry: At,
					PlaneBufferGeometry: Lt,
					ExtrudeGeometry: Oe,
					ExtrudeBufferGeometry: Ie,
					ConeGeometry: He,
					ConeBufferGeometry: Ve,
					CylinderGeometry: Fe,
					CylinderBufferGeometry: Ge,
					CircleGeometry: We,
					CircleBufferGeometry: qe,
					BoxGeometry: Pt,
					BoxBufferGeometry: kt,
					ShapeGeometry: Et,
					ShapeBufferGeometry: Ct
				});
				(Xe.prototype = Object.create(J.prototype)).constructor = Xe, Xe.prototype.isShadowMaterial = !0, (Ke.prototype = Object.create(Ot.prototype)).constructor = Ke, Ke.prototype.isRawShaderMaterial = !0, (Ye.prototype = Object.create(J.prototype)).constructor = Ye, Ye.prototype.isMeshPhongMaterial = !0, Ye.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.color.copy(t.color), this.specular.copy(t.specular), this.shininess = t.shininess, this.map = t.map, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.emissive.copy(t.emissive), this.emissiveMap = t.emissiveMap, this.emissiveIntensity = t.emissiveIntensity, this.bumpMap = t.bumpMap, this.bumpScale = t.bumpScale, this.normalMap = t.normalMap, this.normalScale.copy(t.normalScale), this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this.specularMap = t.specularMap, this.alphaMap = t.alphaMap, this.envMap = t.envMap, this.combine = t.combine, this.reflectivity = t.reflectivity, this.refractionRatio = t.refractionRatio, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this
				}, (Ze.prototype = Object.create(J.prototype)).constructor = Ze, Ze.prototype.isMeshLambertMaterial = !0, Ze.prototype.copy = function (t) {
					return J.prototype.copy.call(this, t), this.color.copy(t.color), this.map = t.map, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.emissive.copy(t.emissive), this.emissiveMap = t.emissiveMap, this.emissiveIntensity = t.emissiveIntensity, this.specularMap = t.specularMap, this.alphaMap = t.alphaMap, this.envMap = t.envMap, this.combine = t.combine, this.reflectivity = t.reflectivity, this.refractionRatio = t.refractionRatio, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this
				}, (Je.prototype = Object.create(fe.prototype)).constructor = Je, Je.prototype.isLineDashedMaterial = !0, Je.prototype.copy = function (t) {
					return fe.prototype.copy.call(this, t), this.scale = t.scale, this.dashSize = t.dashSize, this.gapSize = t.gapSize, this
				};
				var vo = Object.freeze({
						ShadowMaterial: Xe,
						SpriteMaterial: se,
						MeshPhongMaterial: Ye,
						MeshLambertMaterial: Ze,
						MeshBasicMaterial: Rt,
						Material: J
					}),
					yo = {
						enabled: !1,
						files: {},
						add: function (t, e) {
							!1 !== this.enabled && (this.files[t] = e)
						},
						get: function (t) {
							if (!1 !== this.enabled) return this.files[t]
						},
						remove: function (t) {
							delete this.files[t]
						},
						clear: function () {
							this.files = {}
						}
					},
					bo = new Qe,
					xo = {};
				Object.assign($e.prototype, {
					load: function (t, e, i, n) {
						void 0 === t && (t = ""), void 0 !== this.path && (t = this.path + t);
						var r = this,
							a = yo.get(t);
						if (void 0 !== a) return r.manager.itemStart(t), setTimeout(function () {
							e && e(a), r.manager.itemEnd(t)
						}, 0), a;
						if (void 0 === xo[t]) {
							var o = t.match(/^data:(.*?)(;base64)?,(.*)$/);
							if (o) {
								var s = o[1],
									h = !!o[2],
									l = o[3];
								l = window.decodeURIComponent(l), h && (l = window.atob(l));
								try {
									var c, u = (this.responseType || "").toLowerCase();
									switch (u) {
										case "arraybuffer":
										case "blob":
											for (var d = new Uint8Array(l.length), f = 0; f < l.length; f++) d[f] = l.charCodeAt(f);
											c = "blob" === u ? new Blob([d.buffer], {
												type: s
											}) : d.buffer;
											break;
										case "document":
											var p = new DOMParser;
											c = p.parseFromString(l, s);
											break;
										case "json":
											c = JSON.parse(l);
											break;
										default:
											c = l
									}
									window.setTimeout(function () {
										e && e(c), r.manager.itemEnd(t)
									}, 0)
								} catch (e) {
									window.setTimeout(function () {
										n && n(e), r.manager.itemEnd(t), r.manager.itemError(t)
									}, 0)
								}
							} else {
								xo[t] = [], xo[t].push({
									onLoad: e,
									onProgress: i,
									onError: n
								});
								var m = new XMLHttpRequest;
								m.open("GET", t, !0), m.addEventListener("load", function (e) {
									var i = e.target.response;
									yo.add(t, i);
									var n = xo[t];
									if (delete xo[t], 200 === this.status) {
										for (var a = 0, o = n.length; a < o; a++) {
											(s = n[a]).onLoad && s.onLoad(i)
										}
										r.manager.itemEnd(t)
									} else if (0 === this.status) {
										console.warn("THREE.FileLoader: HTTP Status 0 received.");
										for (var a = 0, o = n.length; a < o; a++) {
											(s = n[a]).onLoad && s.onLoad(i)
										}
										r.manager.itemEnd(t)
									} else {
										for (var a = 0, o = n.length; a < o; a++) {
											var s = n[a];
											s.onError && s.onError(e)
										}
										r.manager.itemEnd(t), r.manager.itemError(t)
									}
								}, !1), m.addEventListener("progress", function (e) {
									for (var i = xo[t], n = 0, r = i.length; n < r; n++) {
										var a = i[n];
										a.onProgress && a.onProgress(e)
									}
								}, !1), m.addEventListener("error", function (e) {
									for (var i = xo[t], n = 0, a = i.length; n < a; n++) {
										var o = i[n];
										o.onError && o.onError(e)
									}
									r.manager.itemEnd(t), r.manager.itemError(t)
								}, !1), void 0 !== this.responseType && (m.responseType = this.responseType), void 0 !== this.withCredentials && (m.withCredentials = this.withCredentials), m.overrideMimeType && m.overrideMimeType(void 0 !== this.mimeType ? this.mimeType : "text/plain");
								for (var g in this.requestHeader) m.setRequestHeader(g, this.requestHeader[g]);
								m.send(null)
							}
							return r.manager.itemStart(t), m
						}
						xo[t].push({
							onLoad: e,
							onProgress: i,
							onError: n
						})
					},
					setPath: function (t) {
						return this.path = t, this
					},
					setResponseType: function (t) {
						return this.responseType = t, this
					},
					setWithCredentials: function (t) {
						return this.withCredentials = t, this
					},
					setMimeType: function (t) {
						return this.mimeType = t, this
					},
					setRequestHeader: function (t) {
						return this.requestHeader = t, this
					}
				}), Object.assign(ti.prototype, {
					load: function (t, e, i, n) {
						function r(r) {
							h.load(t[r], function (t) {
								var i = a._parser(t, !0);
								o[r] = {
									width: i.width,
									height: i.height,
									format: i.format,
									mipmaps: i.mipmaps
								}, 6 === (l += 1) && (1 === i.mipmapCount && (s.minFilter = na), s.format = i.format, s.needsUpdate = !0, e && e(s))
							}, i, n)
						}
						var a = this,
							o = [],
							s = new _e;
						s.image = o;
						var h = new $e(this.manager);
						if (h.setPath(this.path), h.setResponseType("arraybuffer"), Array.isArray(t))
							for (var l = 0, c = 0, u = t.length; c < u; ++c) r(c);
						else h.load(t, function (t) {
							var i = a._parser(t, !0);
							if (i.isCubemap)
								for (var n = i.mipmaps.length / i.mipmapCount, r = 0; r < n; r++) {
									o[r] = {
										mipmaps: []
									};
									for (var h = 0; h < i.mipmapCount; h++) o[r].mipmaps.push(i.mipmaps[r * i.mipmapCount + h]), o[r].format = i.format, o[r].width = i.width, o[r].height = i.height
								} else s.image.width = i.width, s.image.height = i.height, s.mipmaps = i.mipmaps;
							1 === i.mipmapCount && (s.minFilter = na), s.format = i.format, s.needsUpdate = !0, e && e(s)
						}, i, n);
						return s
					},
					setPath: function (t) {
						return this.path = t, this
					}
				}), Object.assign(ei.prototype, {
					load: function (t, e, i, n) {
						var r = this,
							a = new d,
							o = new $e(this.manager);
						return o.setResponseType("arraybuffer"), o.load(t, function (t) {
							var i = r._parser(t);
							i && (void 0 !== i.image ? a.image = i.image : void 0 !== i.data && (a.image.width = i.width, a.image.height = i.height, a.image.data = i.data), a.wrapS = void 0 !== i.wrapS ? i.wrapS : Qr, a.wrapT = void 0 !== i.wrapT ? i.wrapT : Qr, a.magFilter = void 0 !== i.magFilter ? i.magFilter : na, a.minFilter = void 0 !== i.minFilter ? i.minFilter : aa, a.anisotropy = void 0 !== i.anisotropy ? i.anisotropy : 1, void 0 !== i.format && (a.format = i.format), void 0 !== i.type && (a.type = i.type), void 0 !== i.mipmaps && (a.mipmaps = i.mipmaps), 1 === i.mipmapCount && (a.minFilter = na), a.needsUpdate = !0, e && e(a, i))
						}, i, n), a
					}
				}), Object.assign(ii.prototype, {
					crossOrigin: "Anonymous",
					load: function (t, e, i, n) {
						void 0 === t && (t = ""), void 0 !== this.path && (t = this.path + t);
						var r = this,
							a = yo.get(t);
						if (void 0 !== a) return r.manager.itemStart(t), setTimeout(function () {
							e && e(a), r.manager.itemEnd(t)
						}, 0), a;
						var o = document.createElement("img");
						return o.addEventListener("load", function () {
							yo.add(t, this), e && e(this), r.manager.itemEnd(t)
						}, !1), o.addEventListener("error", function (e) {
							n && n(e), r.manager.itemEnd(t), r.manager.itemError(t)
						}, !1), "data:" !== t.substr(0, 5) && void 0 !== this.crossOrigin && (o.crossOrigin = this.crossOrigin), r.manager.itemStart(t), o.src = t, o
					},
					setCrossOrigin: function (t) {
						return this.crossOrigin = t, this
					},
					setPath: function (t) {
						return this.path = t, this
					}
				}), Object.assign(ni.prototype, {
					crossOrigin: "Anonymous",
					load: function (t, e, i, n) {
						function r(i) {
							o.load(t[i], function (t) {
								a.images[i] = t, 6 === ++s && (a.needsUpdate = !0, e && e(a))
							}, void 0, n)
						}
						var a = new f,
							o = new ii(this.manager);
						o.setCrossOrigin(this.crossOrigin), o.setPath(this.path);
						for (var s = 0, h = 0; h < t.length; ++h) r(h);
						return a
					},
					setCrossOrigin: function (t) {
						return this.crossOrigin = t, this
					},
					setPath: function (t) {
						return this.path = t, this
					}
				}), Object.assign(ri.prototype, {
					crossOrigin: "Anonymous",
					load: function (t, e, i, n) {
						var r = new ii(this.manager);
						r.setCrossOrigin(this.crossOrigin), r.setPath(this.path);
						var a = new h;
						return a.image = r.load(t, function () {
							var i = t.search(/\.(jpg|jpeg)$/) > 0 || 0 === t.search(/^data\:image\/jpeg/);
							a.format = i ? ba : xa, a.needsUpdate = !0, void 0 !== e && e(a)
						}, i, n), a
					},
					setCrossOrigin: function (t) {
						return this.crossOrigin = t, this
					},
					setPath: function (t) {
						return this.path = t, this
					}
				}), ai.prototype = Object.assign(Object.create(ht.prototype), {
					constructor: ai,
					isLight: !0,
					copy: function (t) {
						return ht.prototype.copy.call(this, t), this.color.copy(t.color), this.intensity = t.intensity, this
					},
					toJSON: function (t) {
						var e = ht.prototype.toJSON.call(this, t);
						return e.object.color = this.color.getHex(), e.object.intensity = this.intensity, void 0 !== this.groundColor && (e.object.groundColor = this.groundColor.getHex()), void 0 !== this.distance && (e.object.distance = this.distance), void 0 !== this.angle && (e.object.angle = this.angle), void 0 !== this.decay && (e.object.decay = this.decay), void 0 !== this.penumbra && (e.object.penumbra = this.penumbra), void 0 !== this.shadow && (e.object.shadow = this.shadow.toJSON()), e
					}
				}), oi.prototype = Object.assign(Object.create(ai.prototype), {
					constructor: oi,
					isHemisphereLight: !0,
					copy: function (t) {
						return ai.prototype.copy.call(this, t), this.groundColor.copy(t.groundColor), this
					}
				}), Object.assign(si.prototype, {
					copy: function (t) {
						return this.camera = t.camera.clone(), this.bias = t.bias, this.radius = t.radius, this.mapSize.copy(t.mapSize), this
					},
					clone: function () {
						return (new this.constructor).copy(this)
					},
					toJSON: function () {
						var t = {};
						return 0 !== this.bias && (t.bias = this.bias), 1 !== this.radius && (t.radius = this.radius), 512 === this.mapSize.x && 512 === this.mapSize.y || (t.mapSize = this.mapSize.toArray()), t.camera = this.camera.toJSON(!1).object, delete t.camera.matrix, t
					}
				}), hi.prototype = Object.assign(Object.create(si.prototype), {
					constructor: hi,
					isSpotLightShadow: !0,
					update: function (t) {
						var e = this.camera,
							i = 2 * Ya.RAD2DEG * t.angle,
							n = this.mapSize.width / this.mapSize.height,
							r = t.distance || e.far;
						i === e.fov && n === e.aspect && r === e.far || (e.fov = i, e.aspect = n, e.far = r, e.updateProjectionMatrix())
					}
				}), li.prototype = Object.assign(Object.create(ai.prototype), {
					constructor: li,
					isSpotLight: !0,
					copy: function (t) {
						return ai.prototype.copy.call(this, t), this.distance = t.distance, this.angle = t.angle, this.penumbra = t.penumbra, this.decay = t.decay, this.target = t.target.clone(), this.shadow = t.shadow.clone(), this
					}
				}), ci.prototype = Object.assign(Object.create(ai.prototype), {
					constructor: ci,
					isPointLight: !0,
					copy: function (t) {
						return ai.prototype.copy.call(this, t), this.distance = t.distance, this.decay = t.decay, this.shadow = t.shadow.clone(), this
					}
				}), ui.prototype = Object.assign(Object.create(si.prototype), {
					constructor: ui
				}), di.prototype = Object.assign(Object.create(ai.prototype), {
					constructor: di,
					isDirectionalLight: !0,
					copy: function (t) {
						return ai.prototype.copy.call(this, t), this.target = t.target.clone(), this.shadow = t.shadow.clone(), this
					}
				}), fi.prototype = Object.assign(Object.create(ai.prototype), {
					constructor: fi,
					isAmbientLight: !0
				}), pi.prototype = Object.assign(Object.create(ai.prototype), {
					constructor: pi,
					isRectAreaLight: !0,
					copy: function (t) {
						return ai.prototype.copy.call(this, t), this.width = t.width, this.height = t.height, this
					},
					toJSON: function (t) {
						var e = ai.prototype.toJSON.call(this, t);
						return e.object.width = this.width, e.object.height = this.height, e
					}
				});
				var _o = {
					arraySlice: function (t, e, i) {
						return _o.isTypedArray(t) ? new t.constructor(t.subarray(e, void 0 !== i ? i : t.length)) : t.slice(e, i)
					},
					convertArray: function (t, e, i) {
						return !t || !i && t.constructor === e ? t : "number" == typeof e.BYTES_PER_ELEMENT ? new e(t) : Array.prototype.slice.call(t)
					},
					isTypedArray: function (t) {
						return ArrayBuffer.isView(t) && !(t instanceof DataView)
					},
					getKeyframeOrder: function (t) {
						for (var e = t.length, i = new Array(e), n = 0; n !== e; ++n) i[n] = n;
						return i.sort(function (e, i) {
							return t[e] - t[i]
						}), i
					},
					sortedArray: function (t, e, i) {
						for (var n = t.length, r = new t.constructor(n), a = 0, o = 0; o !== n; ++a)
							for (var s = i[a] * e, h = 0; h !== e; ++h) r[o++] = t[s + h];
						return r
					},
					flattenJSON: function (t, e, i, n) {
						for (var r = 1, a = t[0]; void 0 !== a && void 0 === a[n];) a = t[r++];
						if (void 0 !== a) {
							var o = a[n];
							if (void 0 !== o)
								if (Array.isArray(o))
									do {
										void 0 !== (o = a[n]) && (e.push(a.time), i.push.apply(i, o)), a = t[r++]
									} while (void 0 !== a);
								else if (void 0 !== o.toArray)
								do {
									void 0 !== (o = a[n]) && (e.push(a.time), o.toArray(i, i.length)), a = t[r++]
								} while (void 0 !== a);
							else
								do {
									void 0 !== (o = a[n]) && (e.push(a.time), i.push(o)), a = t[r++]
								} while (void 0 !== a)
						}
					}
				};
				Object.assign(mi.prototype, {
						evaluate: function (t) {
							var e = this.parameterPositions,
								i = this._cachedIndex,
								n = e[i],
								r = e[i - 1];
							t: {
								e: {
									var a;i: {
										n: if (!(t < n)) {
											for (s = i + 2;;) {
												if (void 0 === n) {
													if (t < r) break n;
													return i = e.length, this._cachedIndex = i, this.afterEnd_(i - 1, t, r)
												}
												if (i === s) break;
												if (r = n, n = e[++i], t < n) break e
											}
											a = e.length;
											break i
										}if (t >= r) break t;
										var o = e[1];t < o && (i = 2, r = o);
										for (var s = i - 2;;) {
											if (void 0 === r) return this._cachedIndex = 0, this.beforeStart_(0, t, n);
											if (i === s) break;
											if (n = r, r = e[--i - 1], t >= r) break e
										}
										a = i,
										i = 0
									}
									for (; i < a;) {
										var h = i + a >>> 1;
										t < e[h] ? a = h : i = h + 1
									}
									if (n = e[i], void 0 === (r = e[i - 1])) return this._cachedIndex = 0, this.beforeStart_(0, t, n);
									if (void 0 === n) return i = e.length, this._cachedIndex = i, this.afterEnd_(i - 1, r, t)
								}
								this._cachedIndex = i,
								this.intervalChanged_(i, r, n)
							}
							return this.interpolate_(i, r, t, n)
						},
						settings: null,
						DefaultSettings_: {},
						getSettings_: function () {
							return this.settings || this.DefaultSettings_
						},
						copySampleValue_: function (t) {
							for (var e = this.resultBuffer, i = this.sampleValues, n = this.valueSize, r = t * n, a = 0; a !== n; ++a) e[a] = i[r + a];
							return e
						},
						interpolate_: function () {
							throw new Error("call to abstract method")
						},
						intervalChanged_: function () {}
					}), //!\ DECLARE ALIAS AFTER assign prototype !
					Object.assign(mi.prototype, {
						beforeStart_: mi.prototype.copySampleValue_,
						afterEnd_: mi.prototype.copySampleValue_
					}), gi.prototype = Object.assign(Object.create(mi.prototype), {
						constructor: gi,
						DefaultSettings_: {
							endingStart: Ua,
							endingEnd: Ua
						},
						intervalChanged_: function (t, e, i) {
							var n = this.parameterPositions,
								r = t - 2,
								a = t + 1,
								o = n[r],
								s = n[a];
							if (void 0 === o) switch (this.getSettings_().endingStart) {
								case 2401:
									r = t, o = 2 * e - i;
									break;
								case 2402:
									o = e + n[r = n.length - 2] - n[r + 1];
									break;
								default:
									r = t, o = i
							}
							if (void 0 === s) switch (this.getSettings_().endingEnd) {
								case 2401:
									a = t, s = 2 * i - e;
									break;
								case 2402:
									a = 1, s = i + n[1] - n[0];
									break;
								default:
									a = t - 1, s = e
							}
							var h = .5 * (i - e),
								l = this.valueSize;
							this._weightPrev = h / (e - o), this._weightNext = h / (s - i), this._offsetPrev = r * l, this._offsetNext = a * l
						},
						interpolate_: function (t, e, i, n) {
							for (var r = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = t * o, h = s - o, l = this._offsetPrev, c = this._offsetNext, u = this._weightPrev, d = this._weightNext, f = (i - e) / (n - e), p = f * f, m = p * f, g = -u * m + 2 * u * p - u * f, v = (1 + u) * m + (-1.5 - 2 * u) * p + (-.5 + u) * f + 1, y = (-1 - d) * m + (1.5 + d) * p + .5 * f, b = d * m - d * p, x = 0; x !== o; ++x) r[x] = g * a[l + x] + v * a[h + x] + y * a[s + x] + b * a[c + x];
							return r
						}
					}), vi.prototype = Object.assign(Object.create(mi.prototype), {
						constructor: vi,
						interpolate_: function (t, e, i, n) {
							for (var r = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = t * o, h = s - o, l = (i - e) / (n - e), c = 1 - l, u = 0; u !== o; ++u) r[u] = a[h + u] * c + a[s + u] * l;
							return r
						}
					}), yi.prototype = Object.assign(Object.create(mi.prototype), {
						constructor: yi,
						interpolate_: function (t) {
							return this.copySampleValue_(t - 1)
						}
					});
				var wo;
				wo = {
					TimeBufferType: Float32Array,
					ValueBufferType: Float32Array,
					DefaultInterpolation: 2301,
					InterpolantFactoryMethodDiscrete: function (t) {
						return new yi(this.times, this.values, this.getValueSize(), t)
					},
					InterpolantFactoryMethodLinear: function (t) {
						return new vi(this.times, this.values, this.getValueSize(), t)
					},
					InterpolantFactoryMethodSmooth: function (t) {
						return new gi(this.times, this.values, this.getValueSize(), t)
					},
					setInterpolation: function (t) {
						var e;
						switch (t) {
							case 2300:
								e = this.InterpolantFactoryMethodDiscrete;
								break;
							case 2301:
								e = this.InterpolantFactoryMethodLinear;
								break;
							case 2302:
								e = this.InterpolantFactoryMethodSmooth
						}
						if (void 0 !== e) this.createInterpolant = e;
						else {
							var i = "unsupported interpolation for " + this.ValueTypeName + " keyframe track named " + this.name;
							if (void 0 === this.createInterpolant) {
								if (t === this.DefaultInterpolation) throw new Error(i);
								this.setInterpolation(this.DefaultInterpolation)
							}
							console.warn("THREE.KeyframeTrackPrototype:", i)
						}
					},
					getInterpolation: function () {
						switch (this.createInterpolant) {
							case this.InterpolantFactoryMethodDiscrete:
								return 2300;
							case this.InterpolantFactoryMethodLinear:
								return 2301;
							case this.InterpolantFactoryMethodSmooth:
								return 2302
						}
					},
					getValueSize: function () {
						return this.values.length / this.times.length
					},
					shift: function (t) {
						if (0 !== t)
							for (var e = this.times, i = 0, n = e.length; i !== n; ++i) e[i] += t;
						return this
					},
					scale: function (t) {
						if (1 !== t)
							for (var e = this.times, i = 0, n = e.length; i !== n; ++i) e[i] *= t;
						return this
					},
					trim: function (t, e) {
						for (var i = this.times, n = i.length, r = 0, a = n - 1; r !== n && i[r] < t;) ++r;
						for (; - 1 !== a && i[a] > e;) --a;
						if (++a, 0 !== r || a !== n) {
							r >= a && (a = Math.max(a, 1), r = a - 1);
							var o = this.getValueSize();
							this.times = _o.arraySlice(i, r, a), this.values = _o.arraySlice(this.values, r * o, a * o)
						}
						return this
					},
					validate: function () {
						var t = !0,
							e = this.getValueSize();
						e - Math.floor(e) != 0 && (console.error("THREE.KeyframeTrackPrototype: Invalid value size in track.", this), t = !1);
						var i = this.times,
							n = this.values,
							r = i.length;
						0 === r && (console.error("THREE.KeyframeTrackPrototype: Track is empty.", this), t = !1);
						for (var a = null, o = 0; o !== r; o++) {
							var s = i[o];
							if ("number" == typeof s && isNaN(s)) {
								console.error("THREE.KeyframeTrackPrototype: Time is not a valid number.", this, o, s), t = !1;
								break
							}
							if (null !== a && a > s) {
								console.error("THREE.KeyframeTrackPrototype: Out of order keys.", this, o, s, a), t = !1;
								break
							}
							a = s
						}
						if (void 0 !== n && _o.isTypedArray(n))
							for (var o = 0, h = n.length; o !== h; ++o) {
								var l = n[o];
								if (isNaN(l)) {
									console.error("THREE.KeyframeTrackPrototype: Value is not a valid number.", this, o, l), t = !1;
									break
								}
							}
						return t
					},
					optimize: function () {
						for (var t = this.times, e = this.values, i = this.getValueSize(), n = 2302 === this.getInterpolation(), r = 1, a = t.length - 1, o = 1; o < a; ++o) {
							var s = !1,
								h = t[o];
							if (h !== t[o + 1] && (1 !== o || h !== h[0]))
								if (n) s = !0;
								else
									for (var l = o * i, c = l - i, u = l + i, d = 0; d !== i; ++d) {
										var f = e[l + d];
										if (f !== e[c + d] || f !== e[u + d]) {
											s = !0;
											break
										}
									}
							if (s) {
								if (o !== r) {
									t[r] = t[o];
									for (var p = o * i, m = r * i, d = 0; d !== i; ++d) e[m + d] = e[p + d]
								}++r
							}
						}
						if (a > 0) {
							t[r] = t[a];
							for (var p = a * i, m = r * i, d = 0; d !== i; ++d) e[m + d] = e[p + d];
							++r
						}
						return r !== t.length && (this.times = _o.arraySlice(t, 0, r), this.values = _o.arraySlice(e, 0, r * i)), this
					}
				}, xi.prototype = Object.assign(Object.create(wo), {
					constructor: xi,
					ValueTypeName: "vector"
				}), _i.prototype = Object.assign(Object.create(mi.prototype), {
					constructor: _i,
					interpolate_: function (t, e, i, n) {
						for (var a = this.resultBuffer, o = this.sampleValues, s = this.valueSize, h = t * s, l = (i - e) / (n - e), c = h + s; h !== c; h += 4) r.slerpFlat(a, 0, o, h - s, o, h, l);
						return a
					}
				}), wi.prototype = Object.assign(Object.create(wo), {
					constructor: wi,
					ValueTypeName: "quaternion",
					DefaultInterpolation: 2301,
					InterpolantFactoryMethodLinear: function (t) {
						return new _i(this.times, this.values, this.getValueSize(), t)
					},
					InterpolantFactoryMethodSmooth: void 0
				}), Mi.prototype = Object.assign(Object.create(wo), {
					constructor: Mi,
					ValueTypeName: "number"
				}), Ti.prototype = Object.assign(Object.create(wo), {
					constructor: Ti,
					ValueTypeName: "string",
					ValueBufferType: Array,
					DefaultInterpolation: 2300,
					InterpolantFactoryMethodLinear: void 0,
					InterpolantFactoryMethodSmooth: void 0
				}), Si.prototype = Object.assign(Object.create(wo), {
					constructor: Si,
					ValueTypeName: "bool",
					ValueBufferType: Array,
					DefaultInterpolation: 2300,
					InterpolantFactoryMethodLinear: void 0,
					InterpolantFactoryMethodSmooth: void 0
				}), Ei.prototype = Object.assign(Object.create(wo), {
					constructor: Ei,
					ValueTypeName: "color"
				}), Ci.prototype = wo, wo.constructor = Ci, Object.assign(Ci, {
					parse: function (t) {
						if (void 0 === t.type) throw new Error("track type undefined, can not parse");
						var e = Ci._getTrackTypeForValueTypeName(t.type);
						if (void 0 === t.times) {
							var i = [],
								n = [];
							_o.flattenJSON(t.keys, i, n, "value"), t.times = i, t.values = n
						}
						return void 0 !== e.parse ? e.parse(t) : new e(t.name, t.times, t.values, t.interpolation)
					},
					toJSON: function (t) {
						var e, i = t.constructor;
						if (void 0 !== i.toJSON) e = i.toJSON(t);
						else {
							e = {
								name: t.name,
								times: _o.convertArray(t.times, Array),
								values: _o.convertArray(t.values, Array)
							};
							var n = t.getInterpolation();
							n !== t.DefaultInterpolation && (e.interpolation = n)
						}
						return e.type = t.ValueTypeName, e
					},
					_getTrackTypeForValueTypeName: function (t) {
						switch (t.toLowerCase()) {
							case "scalar":
							case "double":
							case "float":
							case "number":
							case "integer":
								return Mi;
							case "vector":
							case "vector2":
							case "vector3":
							case "vector4":
								return xi;
							case "color":
								return Ei;
							case "quaternion":
								return wi;
							case "bool":
							case "boolean":
								return Si;
							case "string":
								return Ti
						}
						throw new Error("Unsupported typeName: " + t)
					}
				}), Object.assign(Pi, {
					parse: function (t) {
						for (var e = [], i = t.tracks, n = 1 / (t.fps || 1), r = 0, a = i.length; r !== a; ++r) e.push(Ci.parse(i[r]).scale(n));
						return new Pi(t.name, t.duration, e)
					},
					toJSON: function (t) {
						for (var e = [], i = t.tracks, n = {
								name: t.name,
								duration: t.duration,
								tracks: e
							}, r = 0, a = i.length; r !== a; ++r) e.push(Ci.toJSON(i[r]));
						return n
					},
					CreateFromMorphTargetSequence: function (t, e, i, n) {
						for (var r = e.length, a = [], o = 0; o < r; o++) {
							var s = [],
								h = [];
							s.push((o + r - 1) % r, o, (o + 1) % r), h.push(0, 1, 0);
							var l = _o.getKeyframeOrder(s);
							s = _o.sortedArray(s, 1, l), h = _o.sortedArray(h, 1, l), n || 0 !== s[0] || (s.push(r), h.push(h[0])), a.push(new Mi(".morphTargetInfluences[" + e[o].name + "]", s, h).scale(1 / i))
						}
						return new Pi(t, -1, a)
					},
					findByName: function (t, e) {
						var i = t;
						if (!Array.isArray(t)) {
							var n = t;
							i = n.geometry && n.geometry.animations || n.animations
						}
						for (var r = 0; r < i.length; r++)
							if (i[r].name === e) return i[r];
						return null
					},
					CreateClipsFromMorphTargetSequences: function (t, e, i) {
						for (var n = {}, r = /^([\w-]*?)([\d]+)$/, a = 0, o = t.length; a < o; a++) {
							var s = t[a],
								h = s.name.match(r);
							if (h && h.length > 1) {
								var l = n[u = h[1]];
								l || (n[u] = l = []), l.push(s)
							}
						}
						var c = [];
						for (var u in n) c.push(Pi.CreateFromMorphTargetSequence(u, n[u], e, i));
						return c
					},
					parseAnimation: function (t, e) {
						if (!t) return console.error("THREE.AnimationClip: No animation in JSONLoader data."), null;
						for (var i = function (t, e, i, n, r) {
								if (0 !== i.length) {
									var a = [],
										o = [];
									_o.flattenJSON(i, a, o, n), 0 !== a.length && r.push(new t(e, a, o))
								}
							}, n = [], r = t.name || "default", a = t.length || -1, o = t.fps || 30, s = t.hierarchy || [], h = 0; h < s.length; h++) {
							var l = s[h].keys;
							if (l && 0 !== l.length)
								if (l[0].morphTargets) {
									for (var c = {}, u = 0; u < l.length; u++)
										if (l[u].morphTargets)
											for (m = 0; m < l[u].morphTargets.length; m++) c[l[u].morphTargets[m]] = -1;
									for (var d in c) {
										for (var f = [], p = [], m = 0; m !== l[u].morphTargets.length; ++m) {
											var g = l[u];
											f.push(g.time), p.push(g.morphTarget === d ? 1 : 0)
										}
										n.push(new Mi(".morphTargetInfluence[" + d + "]", f, p))
									}
									a = c.length * (o || 1)
								} else {
									var v = ".bones[" + e[h].name + "]";
									i(xi, v + ".position", l, "pos", n), i(wi, v + ".quaternion", l, "rot", n), i(xi, v + ".scale", l, "scl", n)
								}
						}
						if (0 === n.length) return null;
						return new Pi(r, a, n)
					}
				}), Object.assign(Pi.prototype, {
					resetDuration: function () {
						for (var t = 0, e = 0, i = this.tracks.length; e !== i; ++e) {
							var n = this.tracks[e];
							t = Math.max(t, n.times[n.times.length - 1])
						}
						this.duration = t
					},
					trim: function () {
						for (var t = 0; t < this.tracks.length; t++) this.tracks[t].trim(0, this.duration);
						return this
					},
					optimize: function () {
						for (var t = 0; t < this.tracks.length; t++) this.tracks[t].optimize();
						return this
					}
				}), Object.assign(ki.prototype, {
					load: function (t, e, i, n) {
						var r = this;
						new $e(r.manager).load(t, function (t) {
							e(r.parse(JSON.parse(t)))
						}, i, n)
					},
					setTextures: function (t) {
						this.textures = t
					},
					parse: function (t) {
						function e(t) {
							return void 0 === n[t] && console.warn("THREE.MaterialLoader: Undefined texture", t), n[t]
						}
						var n = this.textures,
							r = new vo[t.type];
						if (void 0 !== t.uuid && (r.uuid = t.uuid), void 0 !== t.name && (r.name = t.name), void 0 !== t.color && r.color.setHex(t.color), void 0 !== t.roughness && (r.roughness = t.roughness), void 0 !== t.metalness && (r.metalness = t.metalness), void 0 !== t.emissive && r.emissive.setHex(t.emissive), void 0 !== t.specular && r.specular.setHex(t.specular), void 0 !== t.shininess && (r.shininess = t.shininess), void 0 !== t.clearCoat && (r.clearCoat = t.clearCoat), void 0 !== t.clearCoatRoughness && (r.clearCoatRoughness = t.clearCoatRoughness), void 0 !== t.uniforms && (r.uniforms = t.uniforms), void 0 !== t.vertexShader && (r.vertexShader = t.vertexShader), void 0 !== t.fragmentShader && (r.fragmentShader = t.fragmentShader), void 0 !== t.vertexColors && (r.vertexColors = t.vertexColors), void 0 !== t.fog && (r.fog = t.fog), void 0 !== t.flatShading && (r.flatShading = t.flatShading), void 0 !== t.blending && (r.blending = t.blending), void 0 !== t.side && (r.side = t.side), void 0 !== t.opacity && (r.opacity = t.opacity), void 0 !== t.transparent && (r.transparent = t.transparent), void 0 !== t.alphaTest && (r.alphaTest = t.alphaTest), void 0 !== t.depthTest && (r.depthTest = t.depthTest), void 0 !== t.depthWrite && (r.depthWrite = t.depthWrite), void 0 !== t.colorWrite && (r.colorWrite = t.colorWrite), void 0 !== t.wireframe && (r.wireframe = t.wireframe), void 0 !== t.wireframeLinewidth && (r.wireframeLinewidth = t.wireframeLinewidth), void 0 !== t.wireframeLinecap && (r.wireframeLinecap = t.wireframeLinecap), void 0 !== t.wireframeLinejoin && (r.wireframeLinejoin = t.wireframeLinejoin), void 0 !== t.rotation && (r.rotation = t.rotation), 1 !== t.linewidth && (r.linewidth = t.linewidth), void 0 !== t.dashSize && (r.dashSize = t.dashSize), void 0 !== t.gapSize && (r.gapSize = t.gapSize), void 0 !== t.scale && (r.scale = t.scale), void 0 !== t.skinning && (r.skinning = t.skinning), void 0 !== t.morphTargets && (r.morphTargets = t.morphTargets), void 0 !== t.dithering && (r.dithering = t.dithering), void 0 !== t.visible && (r.visible = t.visible), void 0 !== t.userData && (r.userData = t.userData), void 0 !== t.shading && (r.flatShading = 1 === t.shading), void 0 !== t.size && (r.size = t.size), void 0 !== t.sizeAttenuation && (r.sizeAttenuation = t.sizeAttenuation), void 0 !== t.map && (r.map = e(t.map)), void 0 !== t.alphaMap && (r.alphaMap = e(t.alphaMap), r.transparent = !0), void 0 !== t.bumpMap && (r.bumpMap = e(t.bumpMap)), void 0 !== t.bumpScale && (r.bumpScale = t.bumpScale), void 0 !== t.normalMap && (r.normalMap = e(t.normalMap)), void 0 !== t.normalScale) {
							var a = t.normalScale;
							!1 === Array.isArray(a) && (a = [a, a]), r.normalScale = (new i).fromArray(a)
						}
						return void 0 !== t.displacementMap && (r.displacementMap = e(t.displacementMap)), void 0 !== t.displacementScale && (r.displacementScale = t.displacementScale), void 0 !== t.displacementBias && (r.displacementBias = t.displacementBias), void 0 !== t.roughnessMap && (r.roughnessMap = e(t.roughnessMap)), void 0 !== t.metalnessMap && (r.metalnessMap = e(t.metalnessMap)), void 0 !== t.emissiveMap && (r.emissiveMap = e(t.emissiveMap)), void 0 !== t.emissiveIntensity && (r.emissiveIntensity = t.emissiveIntensity), void 0 !== t.specularMap && (r.specularMap = e(t.specularMap)), void 0 !== t.envMap && (r.envMap = e(t.envMap)), void 0 !== t.reflectivity && (r.reflectivity = t.reflectivity), void 0 !== t.lightMap && (r.lightMap = e(t.lightMap)), void 0 !== t.lightMapIntensity && (r.lightMapIntensity = t.lightMapIntensity), void 0 !== t.aoMap && (r.aoMap = e(t.aoMap)), void 0 !== t.aoMapIntensity && (r.aoMapIntensity = t.aoMapIntensity), void 0 !== t.gradientMap && (r.gradientMap = e(t.gradientMap)), r
					}
				}), Object.assign(Ai.prototype, {
					load: function (t, e, i, n) {
						var r = this;
						new $e(r.manager).load(t, function (t) {
							e(r.parse(JSON.parse(t)))
						}, i, n)
					},
					parse: function (t) {
						var e = new St,
							i = t.data.index;
						if (void 0 !== i) {
							s = new Mo[i.type](i.array);
							e.setIndex(new ft(s, 1))
						}
						var n = t.data.attributes;
						for (var r in n) {
							var o = n[r],
								s = new Mo[o.type](o.array);
							e.addAttribute(r, new ft(s, o.itemSize, o.normalized))
						}
						var h = t.data.groups || t.data.drawcalls || t.data.offsets;
						if (void 0 !== h)
							for (var l = 0, c = h.length; l !== c; ++l) {
								var u = h[l];
								e.addGroup(u.start, u.count, u.materialIndex)
							}
						var d = t.data.boundingSphere;
						if (void 0 !== d) {
							var f = new a;
							void 0 !== d.center && f.fromArray(d.center), e.boundingSphere = new et(f, d.radius)
						}
						return e
					}
				});
				var Mo = {
					Int8Array: Int8Array,
					Uint8Array: Uint8Array,
					Uint8ClampedArray: "undefined" != typeof Uint8ClampedArray ? Uint8ClampedArray : Uint8Array,
					Int16Array: Int16Array,
					Uint16Array: Uint16Array,
					Int32Array: Int32Array,
					Uint32Array: Uint32Array,
					Float32Array: Float32Array,
					Float64Array: Float64Array
				};
				Li.Handlers = {
					handlers: [],
					add: function (t, e) {
						this.handlers.push(t, e)
					},
					get: function (t) {
						for (var e = this.handlers, i = 0, n = e.length; i < n; i += 2) {
							var r = e[i],
								a = e[i + 1];
							if (r.test(t)) return a
						}
						return null
					}
				}, Object.assign(Li.prototype, {
					crossOrigin: void 0,
					extractUrlBase: function (t) {
						var e = t.split("/");
						return 1 === e.length ? "./" : (e.pop(), e.join("/") + "/")
					},
					initMaterials: function (t, e, i) {
						for (var n = [], r = 0; r < t.length; ++r) n[r] = this.createMaterial(t[r], e, i);
						return n
					},
					createMaterial: function () {
						var t = {
								NoBlending: or,
								NormalBlending: sr,
								AdditiveBlending: hr,
								SubtractiveBlending: lr,
								MultiplyBlending: cr,
								CustomBlending: ur
							},
							e = new q,
							i = new ri,
							n = new ki;
						return function (r, a, o) {
							function s(t, e, n, r, s) {
								var l, c = a + t,
									u = Li.Handlers.get(c);
								null !== u ? l = u.load(c) : (i.setCrossOrigin(o), l = i.load(c)), void 0 !== e && (l.repeat.fromArray(e), 1 !== e[0] && (l.wrapS = Jr), 1 !== e[1] && (l.wrapT = Jr)), void 0 !== n && l.offset.fromArray(n), void 0 !== r && ("repeat" === r[0] && (l.wrapS = Jr), "mirror" === r[0] && (l.wrapS = $r), "repeat" === r[1] && (l.wrapT = Jr), "mirror" === r[1] && (l.wrapT = $r)), void 0 !== s && (l.anisotropy = s);
								var d = Ya.generateUUID();
								return h[d] = l, d
							}
							var h = {},
								l = {
									uuid: Ya.generateUUID(),
									type: "MeshLambertMaterial"
								};
							for (var c in r) {
								var u = r[c];
								switch (c) {
									case "DbgColor":
									case "DbgIndex":
									case "opticalDensity":
									case "illumination":
										break;
									case "DbgName":
										l.name = u;
										break;
									case "blending":
										l.blending = t[u];
										break;
									case "colorAmbient":
									case "mapAmbient":
										console.warn("THREE.Loader.createMaterial:", c, "is no longer supported.");
										break;
									case "colorDiffuse":
										l.color = e.fromArray(u).getHex();
										break;
									case "colorSpecular":
										l.specular = e.fromArray(u).getHex();
										break;
									case "colorEmissive":
										l.emissive = e.fromArray(u).getHex();
										break;
									case "specularCoef":
										l.shininess = u;
										break;
									case "shading":
										"basic" === u.toLowerCase() && (l.type = "MeshBasicMaterial"), "phong" === u.toLowerCase() && (l.type = "MeshPhongMaterial"), "standard" === u.toLowerCase() && (l.type = "MeshStandardMaterial");
										break;
									case "mapDiffuse":
										l.map = s(u, r.mapDiffuseRepeat, r.mapDiffuseOffset, r.mapDiffuseWrap, r.mapDiffuseAnisotropy);
										break;
									case "mapDiffuseRepeat":
									case "mapDiffuseOffset":
									case "mapDiffuseWrap":
									case "mapDiffuseAnisotropy":
										break;
									case "mapEmissive":
										l.emissiveMap = s(u, r.mapEmissiveRepeat, r.mapEmissiveOffset, r.mapEmissiveWrap, r.mapEmissiveAnisotropy);
										break;
									case "mapEmissiveRepeat":
									case "mapEmissiveOffset":
									case "mapEmissiveWrap":
									case "mapEmissiveAnisotropy":
										break;
									case "mapLight":
										l.lightMap = s(u, r.mapLightRepeat, r.mapLightOffset, r.mapLightWrap, r.mapLightAnisotropy);
										break;
									case "mapLightRepeat":
									case "mapLightOffset":
									case "mapLightWrap":
									case "mapLightAnisotropy":
										break;
									case "mapAO":
										l.aoMap = s(u, r.mapAORepeat, r.mapAOOffset, r.mapAOWrap, r.mapAOAnisotropy);
										break;
									case "mapAORepeat":
									case "mapAOOffset":
									case "mapAOWrap":
									case "mapAOAnisotropy":
										break;
									case "mapBump":
										l.bumpMap = s(u, r.mapBumpRepeat, r.mapBumpOffset, r.mapBumpWrap, r.mapBumpAnisotropy);
										break;
									case "mapBumpScale":
										l.bumpScale = u;
										break;
									case "mapBumpRepeat":
									case "mapBumpOffset":
									case "mapBumpWrap":
									case "mapBumpAnisotropy":
										break;
									case "mapNormal":
										l.normalMap = s(u, r.mapNormalRepeat, r.mapNormalOffset, r.mapNormalWrap, r.mapNormalAnisotropy);
										break;
									case "mapNormalFactor":
										l.normalScale = [u, u];
										break;
									case "mapNormalRepeat":
									case "mapNormalOffset":
									case "mapNormalWrap":
									case "mapNormalAnisotropy":
										break;
									case "mapSpecular":
										l.specularMap = s(u, r.mapSpecularRepeat, r.mapSpecularOffset, r.mapSpecularWrap, r.mapSpecularAnisotropy);
										break;
									case "mapSpecularRepeat":
									case "mapSpecularOffset":
									case "mapSpecularWrap":
									case "mapSpecularAnisotropy":
										break;
									case "mapMetalness":
										l.metalnessMap = s(u, r.mapMetalnessRepeat, r.mapMetalnessOffset, r.mapMetalnessWrap, r.mapMetalnessAnisotropy);
										break;
									case "mapMetalnessRepeat":
									case "mapMetalnessOffset":
									case "mapMetalnessWrap":
									case "mapMetalnessAnisotropy":
										break;
									case "mapRoughness":
										l.roughnessMap = s(u, r.mapRoughnessRepeat, r.mapRoughnessOffset, r.mapRoughnessWrap, r.mapRoughnessAnisotropy);
										break;
									case "mapRoughnessRepeat":
									case "mapRoughnessOffset":
									case "mapRoughnessWrap":
									case "mapRoughnessAnisotropy":
										break;
									case "mapAlpha":
										l.alphaMap = s(u, r.mapAlphaRepeat, r.mapAlphaOffset, r.mapAlphaWrap, r.mapAlphaAnisotropy);
										break;
									case "mapAlphaRepeat":
									case "mapAlphaOffset":
									case "mapAlphaWrap":
									case "mapAlphaAnisotropy":
										break;
									case "flipSided":
										l.side = er;
										break;
									case "doubleSided":
										l.side = ir;
										break;
									case "transparency":
										console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"), l.opacity = u;
										break;
									case "depthTest":
									case "depthWrite":
									case "colorWrite":
									case "opacity":
									case "reflectivity":
									case "transparent":
									case "visible":
									case "wireframe":
										l[c] = u;
										break;
									case "vertexColors":
										!0 === u && (l.vertexColors = ar), "face" === u && (l.vertexColors = rr);
										break;
									default:
										console.error("THREE.Loader.createMaterial: Unsupported", c, u)
								}
							}
							return "MeshBasicMaterial" === l.type && delete l.emissive, "MeshPhongMaterial" !== l.type && delete l.specular, l.opacity < 1 && (l.transparent = !0), n.setTextures(h), n.parse(l)
						}
					}()
				}), Object.assign(Ri.prototype, {
					load: function (t, e, i, n) {
						var r = this,
							a = this.texturePath && "string" == typeof this.texturePath ? this.texturePath : Li.prototype.extractUrlBase(t),
							o = new $e(this.manager);
						o.setWithCredentials(this.withCredentials), o.load(t, function (i) {
							var n = JSON.parse(i),
								o = n.metadata;
							if (void 0 !== o) {
								var s = o.type;
								if (void 0 !== s) {
									if ("object" === s.toLowerCase()) return void console.error("THREE.JSONLoader: " + t + " should be loaded with THREE.ObjectLoader instead.");
									if ("scene" === s.toLowerCase()) return void console.error("THREE.JSONLoader: " + t + " should be loaded with THREE.SceneLoader instead.")
								}
							}
							var h = r.parse(n, a);
							e(h.geometry, h.materials)
						}, i, n)
					},
					setTexturePath: function (t) {
						this.texturePath = t
					},
					parse: function () {
						return function (t, e) {
							void 0 !== t.data && (t = t.data), void 0 !== t.scale ? t.scale = 1 / t.scale : t.scale = 1;
							var n = new dt;
							if (function (t, e) {
									function n(t, e) {
										return t & 1 << e
									}
									var r, o, s, h, l, c, u, d, f, p, m, g, v, y, b, x, _, w, M, T, S, E, C, P, k, A = t.faces,
										L = t.vertices,
										R = t.normals,
										O = t.colors,
										I = t.scale,
										B = 0;
									if (void 0 !== t.uvs) {
										for (r = 0; r < t.uvs.length; r++) t.uvs[r].length && B++;
										for (r = 0; r < B; r++) e.faceVertexUvs[r] = []
									}
									for (h = 0, l = L.length; h < l;)(w = new a).x = L[h++] * I, w.y = L[h++] * I, w.z = L[h++] * I, e.vertices.push(w);
									for (h = 0, l = A.length; h < l;)
										if (p = A[h++], m = n(p, 0), g = n(p, 1), v = n(p, 3), y = n(p, 4), b = n(p, 5), x = n(p, 6), _ = n(p, 7), m) {
											if (T = new ut, T.a = A[h], T.b = A[h + 1], T.c = A[h + 3], S = new ut, S.a = A[h + 1], S.b = A[h + 2], S.c = A[h + 3], h += 4, g && (f = A[h++], T.materialIndex = f, S.materialIndex = f), s = e.faces.length, v)
												for (r = 0; r < B; r++)
													for (P = t.uvs[r], e.faceVertexUvs[r][s] = [], e.faceVertexUvs[r][s + 1] = [], o = 0; o < 4; o++) k = new i(P[2 * (d = A[h++])], P[2 * d + 1]), 2 !== o && e.faceVertexUvs[r][s].push(k), 0 !== o && e.faceVertexUvs[r][s + 1].push(k);
											if (y && (u = 3 * A[h++], T.normal.set(R[u++], R[u++], R[u]), S.normal.copy(T.normal)), b)
												for (r = 0; r < 4; r++) u = 3 * A[h++], C = new a(R[u++], R[u++], R[u]), 2 !== r && T.vertexNormals.push(C), 0 !== r && S.vertexNormals.push(C);
											if (x && (E = O[c = A[h++]], T.color.setHex(E), S.color.setHex(E)), _)
												for (r = 0; r < 4; r++) E = O[c = A[h++]], 2 !== r && T.vertexColors.push(new q(E)), 0 !== r && S.vertexColors.push(new q(E));
											e.faces.push(T), e.faces.push(S)
										} else {
											if (M = new ut, M.a = A[h++], M.b = A[h++], M.c = A[h++], g && (f = A[h++], M.materialIndex = f), s = e.faces.length, v)
												for (r = 0; r < B; r++)
													for (P = t.uvs[r], e.faceVertexUvs[r][s] = [], o = 0; o < 3; o++) k = new i(P[2 * (d = A[h++])], P[2 * d + 1]), e.faceVertexUvs[r][s].push(k);
											if (y && (u = 3 * A[h++], M.normal.set(R[u++], R[u++], R[u])), b)
												for (r = 0; r < 3; r++) u = 3 * A[h++], C = new a(R[u++], R[u++], R[u]), M.vertexNormals.push(C);
											if (x && (c = A[h++], M.color.setHex(O[c])), _)
												for (r = 0; r < 3; r++) c = A[h++], M.vertexColors.push(new q(O[c]));
											e.faces.push(M)
										}
								}(t, n), function (t, e) {
									var i = void 0 !== t.influencesPerVertex ? t.influencesPerVertex : 2;
									if (t.skinWeights)
										for (var n = 0, r = t.skinWeights.length; n < r; n += i) {
											var a = t.skinWeights[n],
												o = i > 1 ? t.skinWeights[n + 1] : 0,
												s = i > 2 ? t.skinWeights[n + 2] : 0,
												h = i > 3 ? t.skinWeights[n + 3] : 0;
											e.skinWeights.push(new l(a, o, s, h))
										}
									if (t.skinIndices)
										for (var n = 0, r = t.skinIndices.length; n < r; n += i) {
											var c = t.skinIndices[n],
												u = i > 1 ? t.skinIndices[n + 1] : 0,
												d = i > 2 ? t.skinIndices[n + 2] : 0,
												f = i > 3 ? t.skinIndices[n + 3] : 0;
											e.skinIndices.push(new l(c, u, d, f))
										}
									e.bones = t.bones, e.bones && e.bones.length > 0 && (e.skinWeights.length !== e.skinIndices.length || e.skinIndices.length !== e.vertices.length) && console.warn("When skinning, number of vertices (" + e.vertices.length + "), skinIndices (" + e.skinIndices.length + "), and skinWeights (" + e.skinWeights.length + ") should match.")
								}(t, n), function (t, e) {
									var i = t.scale;
									if (void 0 !== t.morphTargets)
										for (var n = 0, r = t.morphTargets.length; n < r; n++) {
											e.morphTargets[n] = {}, e.morphTargets[n].name = t.morphTargets[n].name, e.morphTargets[n].vertices = [];
											for (var o = e.morphTargets[n].vertices, s = t.morphTargets[n].vertices, h = 0, l = s.length; h < l; h += 3) {
												var c = new a;
												c.x = s[h] * i, c.y = s[h + 1] * i, c.z = s[h + 2] * i, o.push(c)
											}
										}
									if (void 0 !== t.morphColors && t.morphColors.length > 0) {
										console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');
										for (var u = e.faces, d = t.morphColors[0].colors, n = 0, r = u.length; n < r; n++) u[n].color.fromArray(d, 3 * n)
									}
								}(t, n), function (t, e) {
									var i = [],
										n = [];
									void 0 !== t.animation && n.push(t.animation), void 0 !== t.animations && (t.animations.length ? n = n.concat(t.animations) : n.push(t.animations));
									for (var r = 0; r < n.length; r++) {
										var a = Pi.parseAnimation(n[r], e.bones);
										a && i.push(a)
									}
									if (e.morphTargets) {
										var o = Pi.CreateClipsFromMorphTargetSequences(e.morphTargets, 10);
										i = i.concat(o)
									}
									i.length > 0 && (e.animations = i)
								}(t, n), n.computeFaceNormals(), n.computeBoundingSphere(), void 0 === t.materials || 0 === t.materials.length) return {
								geometry: n
							};
							return {
								geometry: n,
								materials: Li.prototype.initMaterials(t.materials, e, this.crossOrigin)
							}
						}
					}()
				}), Object.assign(Oi.prototype, {
					load: function (t, e, i, n) {
						"" === this.texturePath && (this.texturePath = t.substring(0, t.lastIndexOf("/") + 1));
						var r = this;
						new $e(r.manager).load(t, function (i) {
							var a = null;
							try {
								a = JSON.parse(i)
							} catch (e) {
								return void 0 !== n && n(e), void console.error("THREE:ObjectLoader: Can't parse " + t + ".", e.message)
							}
							var o = a.metadata;
							void 0 !== o && void 0 !== o.type && "geometry" !== o.type.toLowerCase() ? r.parse(a, e) : console.error("THREE.ObjectLoader: Can't load " + t + ". Use THREE.JSONLoader instead.")
						}, i, n)
					},
					setTexturePath: function (t) {
						this.texturePath = t
					},
					setCrossOrigin: function (t) {
						this.crossOrigin = t
					},
					parse: function (t, e) {
						var i = this.parseGeometries(t.geometries),
							n = this.parseImages(t.images, function () {
								void 0 !== e && e(o)
							}),
							r = this.parseTextures(t.textures, n),
							a = this.parseMaterials(t.materials, r),
							o = this.parseObject(t.object, i, a);
						return t.animations && (o.animations = this.parseAnimations(t.animations)), void 0 !== t.images && 0 !== t.images.length || void 0 !== e && e(o), o
					},
					parseGeometries: function (t) {
						var e = {};
						if (void 0 !== t)
							for (var i = new Ri, n = new Ai, r = 0, a = t.length; r < a; r++) {
								var o, s = t[r];
								switch (s.type) {
									case "PlaneGeometry":
									case "PlaneBufferGeometry":
										o = new go[s.type](s.width, s.height, s.widthSegments, s.heightSegments);
										break;
									case "BoxGeometry":
									case "BoxBufferGeometry":
									case "CubeGeometry":
										o = new go[s.type](s.width, s.height, s.depth, s.widthSegments, s.heightSegments, s.depthSegments);
										break;
									case "CircleGeometry":
									case "CircleBufferGeometry":
										o = new go[s.type](s.radius, s.segments, s.thetaStart, s.thetaLength);
										break;
									case "CylinderGeometry":
									case "CylinderBufferGeometry":
										o = new go[s.type](s.radiusTop, s.radiusBottom, s.height, s.radialSegments, s.heightSegments, s.openEnded, s.thetaStart, s.thetaLength);
										break;
									case "ConeGeometry":
									case "ConeBufferGeometry":
										o = new go[s.type](s.radius, s.height, s.radialSegments, s.heightSegments, s.openEnded, s.thetaStart, s.thetaLength);
										break;
									case "SphereGeometry":
									case "SphereBufferGeometry":
										o = new go[s.type](s.radius, s.widthSegments, s.heightSegments, s.phiStart, s.phiLength, s.thetaStart, s.thetaLength);
										break;
									case "IcosahedronGeometry":
									case "IcosahedronBufferGeometry":
									case "OctahedronGeometry":
									case "OctahedronBufferGeometry":
									case "TetrahedronGeometry":
									case "TetrahedronBufferGeometry":
										o = new go[s.type](s.radius, s.detail);
										break;
									case "RingGeometry":
									case "RingBufferGeometry":
										o = new go[s.type](s.innerRadius, s.outerRadius, s.thetaSegments, s.phiSegments, s.thetaStart, s.thetaLength);
										break;
									case "BufferGeometry":
										o = n.parse(s);
										break;
									case "Geometry":
										o = i.parse(s, this.texturePath).geometry;
										break;
									default:
										console.warn('THREE.ObjectLoader: Unsupported geometry type "' + s.type + '"');
										continue
								}
								o.uuid = s.uuid, void 0 !== s.name && (o.name = s.name), e[s.uuid] = o
							}
						return e
					},
					parseMaterials: function (t, e) {
						var i = {};
						if (void 0 !== t) {
							var n = new ki;
							n.setTextures(e);
							for (var r = 0, a = t.length; r < a; r++) {
								var o = t[r];
								if ("MultiMaterial" === o.type) {
									for (var s = [], h = 0; h < o.materials.length; h++) s.push(n.parse(o.materials[h]));
									i[o.uuid] = s
								} else i[o.uuid] = n.parse(o)
							}
						}
						return i
					},
					parseAnimations: function (t) {
						for (var e = [], i = 0; i < t.length; i++) {
							var n = Pi.parse(t[i]);
							e.push(n)
						}
						return e
					},
					parseImages: function (t, e) {
						function i(t) {
							return n.manager.itemStart(t), a.load(t, function () {
								n.manager.itemEnd(t)
							}, void 0, function () {
								n.manager.itemEnd(t), n.manager.itemError(t)
							})
						}
						var n = this,
							r = {};
						if (void 0 !== t && t.length > 0) {
							var a = new ii(new Qe(e));
							a.setCrossOrigin(this.crossOrigin);
							for (var o = 0, s = t.length; o < s; o++) {
								var h = t[o],
									l = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url) ? h.url : n.texturePath + h.url;
								r[h.uuid] = i(l)
							}
						}
						return r
					},
					parseTextures: function (t, e) {
						function i(t, e) {
							return "number" == typeof t ? t : (console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.", t), e[t])
						}
						var n = {};
						if (void 0 !== t)
							for (var r = 0, a = t.length; r < a; r++) {
								var o = t[r];
								void 0 === o.image && console.warn('THREE.ObjectLoader: No "image" specified for', o.uuid), void 0 === e[o.image] && console.warn("THREE.ObjectLoader: Undefined image", o.image);
								var s = new h(e[o.image]);
								s.needsUpdate = !0, s.uuid = o.uuid, void 0 !== o.name && (s.name = o.name), void 0 !== o.mapping && (s.mapping = i(o.mapping, To)), void 0 !== o.offset && s.offset.fromArray(o.offset), void 0 !== o.repeat && s.repeat.fromArray(o.repeat), void 0 !== o.center && s.center.fromArray(o.center), void 0 !== o.rotation && (s.rotation = o.rotation), void 0 !== o.wrap && (s.wrapS = i(o.wrap[0], So), s.wrapT = i(o.wrap[1], So)), void 0 !== o.minFilter && (s.minFilter = i(o.minFilter, Eo)), void 0 !== o.magFilter && (s.magFilter = i(o.magFilter, Eo)), void 0 !== o.anisotropy && (s.anisotropy = o.anisotropy), void 0 !== o.flipY && (s.flipY = o.flipY), n[o.uuid] = s
							}
						return n
					},
					parseObject: function () {
						var t = new n;
						return function (e, i, n) {
							function r(t) {
								return void 0 === i[t] && console.warn("THREE.ObjectLoader: Undefined geometry", t), i[t]
							}

							function a(t) {
								if (void 0 !== t) {
									if (Array.isArray(t)) {
										for (var e = [], i = 0, r = t.length; i < r; i++) {
											var a = t[i];
											void 0 === n[a] && console.warn("THREE.ObjectLoader: Undefined material", a), e.push(n[a])
										}
										return e
									}
									return void 0 === n[t] && console.warn("THREE.ObjectLoader: Undefined material", t), n[t]
								}
							}
							var o;
							switch (e.type) {
								case "Scene":
									o = new ae, void 0 !== e.background && Number.isInteger(e.background) && (o.background = new q(e.background)), void 0 !== e.fog && ("Fog" === e.fog.type ? o.fog = new re(e.fog.color, e.fog.near, e.fog.far) : "FogExp2" === e.fog.type && (o.fog = new ne(e.fog.color, e.fog.density)));
									break;
								case "PerspectiveCamera":
									o = new $t(e.fov, e.aspect, e.near, e.far), void 0 !== e.focus && (o.focus = e.focus), void 0 !== e.zoom && (o.zoom = e.zoom), void 0 !== e.filmGauge && (o.filmGauge = e.filmGauge), void 0 !== e.filmOffset && (o.filmOffset = e.filmOffset), void 0 !== e.view && (o.view = Object.assign({}, e.view));
									break;
								case "OrthographicCamera":
									o = new ct(e.left, e.right, e.top, e.bottom, e.near, e.far);
									break;
								case "AmbientLight":
									o = new fi(e.color, e.intensity);
									break;
								case "DirectionalLight":
									o = new di(e.color, e.intensity);
									break;
								case "PointLight":
									o = new ci(e.color, e.intensity, e.distance, e.decay);
									break;
								case "RectAreaLight":
									o = new pi(e.color, e.intensity, e.width, e.height);
									break;
								case "SpotLight":
									o = new li(e.color, e.intensity, e.distance, e.angle, e.penumbra, e.decay);
									break;
								case "HemisphereLight":
									o = new oi(e.color, e.groundColor, e.intensity);
									break;
								case "SkinnedMesh":
									console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");
								case "Mesh":
									var s = r(e.geometry),
										h = a(e.material);
									o = s.bones && s.bones.length > 0 ? new de(s, h) : new Dt(s, h);
									break;
								case "LOD":
									o = new le;
									break;
								case "Line":
									o = new pe(r(e.geometry), a(e.material), e.mode);
									break;
								case "LineLoop":
									o = new ge(r(e.geometry), a(e.material));
									break;
								case "LineSegments":
									o = new me(r(e.geometry), a(e.material));
									break;
								case "PointCloud":
								case "Points":
									o = new ye(r(e.geometry), a(e.material));
									break;
								case "Sprite":
									o = new he(a(e.material));
									break;
								case "Group":
									o = new be;
									break;
								default:
									o = new ht
							}
							if (o.uuid = e.uuid, void 0 !== e.name && (o.name = e.name), void 0 !== e.matrix ? (t.fromArray(e.matrix), t.decompose(o.position, o.quaternion, o.scale)) : (void 0 !== e.position && o.position.fromArray(e.position), void 0 !== e.rotation && o.rotation.fromArray(e.rotation), void 0 !== e.quaternion && o.quaternion.fromArray(e.quaternion), void 0 !== e.scale && o.scale.fromArray(e.scale)), void 0 !== e.castShadow && (o.castShadow = e.castShadow), void 0 !== e.receiveShadow && (o.receiveShadow = e.receiveShadow), e.shadow && (void 0 !== e.shadow.bias && (o.shadow.bias = e.shadow.bias), void 0 !== e.shadow.radius && (o.shadow.radius = e.shadow.radius), void 0 !== e.shadow.mapSize && o.shadow.mapSize.fromArray(e.shadow.mapSize), void 0 !== e.shadow.camera && (o.shadow.camera = this.parseObject(e.shadow.camera))), void 0 !== e.visible && (o.visible = e.visible), void 0 !== e.userData && (o.userData = e.userData), void 0 !== e.children)
								for (var l = e.children, c = 0; c < l.length; c++) o.add(this.parseObject(l[c], i, n));
							if ("LOD" === e.type)
								for (var u = e.levels, d = 0; d < u.length; d++) {
									var f = u[d],
										p = o.getObjectByProperty("uuid", f.object);
									void 0 !== p && o.addLevel(p, f.distance)
								}
							return o
						}
					}()
				});
				var To = {
						UVMapping: 300,
						CubeReflectionMapping: Vr,
						CubeRefractionMapping: Wr,
						EquirectangularReflectionMapping: qr,
						EquirectangularRefractionMapping: Xr,
						SphericalReflectionMapping: Kr,
						CubeUVReflectionMapping: Yr,
						CubeUVRefractionMapping: Zr
					},
					So = {
						RepeatWrapping: Jr,
						ClampToEdgeWrapping: Qr,
						MirroredRepeatWrapping: $r
					},
					Eo = {
						NearestFilter: ta,
						NearestMipMapNearestFilter: ea,
						NearestMipMapLinearFilter: ia,
						LinearFilter: na,
						LinearMipMapNearestFilter: ra,
						LinearMipMapLinearFilter: aa
					};
				Object.assign(Di.prototype, {
					getPoint: function () {
						return console.warn("THREE.Curve: .getPoint() not implemented."), null
					},
					getPointAt: function (t, e) {
						var i = this.getUtoTmapping(t);
						return this.getPoint(i, e)
					},
					getPoints: function (t) {
						void 0 === t && (t = 5);
						for (var e = [], i = 0; i <= t; i++) e.push(this.getPoint(i / t));
						return e
					},
					getSpacedPoints: function (t) {
						void 0 === t && (t = 5);
						for (var e = [], i = 0; i <= t; i++) e.push(this.getPointAt(i / t));
						return e
					},
					getLength: function () {
						var t = this.getLengths();
						return t[t.length - 1]
					},
					getLengths: function (t) {
						if (void 0 === t && (t = this.arcLengthDivisions), this.cacheArcLengths && this.cacheArcLengths.length === t + 1 && !this.needsUpdate) return this.cacheArcLengths;
						this.needsUpdate = !1;
						var e, i, n = [],
							r = this.getPoint(0),
							a = 0;
						for (n.push(0), i = 1; i <= t; i++) a += (e = this.getPoint(i / t)).distanceTo(r), n.push(a), r = e;
						return this.cacheArcLengths = n, n
					},
					updateArcLengths: function () {
						this.needsUpdate = !0, this.getLengths()
					},
					getUtoTmapping: function (t, e) {
						var i, n = this.getLengths(),
							r = 0,
							a = n.length;
						i = e || t * n[a - 1];
						for (var o, s = 0, h = a - 1; s <= h;)
							if (r = Math.floor(s + (h - s) / 2), (o = n[r] - i) < 0) s = r + 1;
							else {
								if (!(o > 0)) {
									h = r;
									break
								}
								h = r - 1
							}
						if (r = h, n[r] === i) return r / (a - 1);
						var l = n[r];
						return (r + (i - l) / (n[r + 1] - l)) / (a - 1)
					},
					getTangent: function (t) {
						var e = t - 1e-4,
							i = t + 1e-4;
						e < 0 && (e = 0), i > 1 && (i = 1);
						var n = this.getPoint(e);
						return this.getPoint(i).clone().sub(n).normalize()
					},
					getTangentAt: function (t) {
						var e = this.getUtoTmapping(t);
						return this.getTangent(e)
					},
					computeFrenetFrames: function (t, e) {
						var i, r, o, s = new a,
							h = [],
							l = [],
							c = [],
							u = new a,
							d = new n;
						for (i = 0; i <= t; i++) r = i / t, h[i] = this.getTangentAt(r), h[i].normalize();
						l[0] = new a, c[0] = new a;
						var f = Number.MAX_VALUE,
							p = Math.abs(h[0].x),
							m = Math.abs(h[0].y),
							g = Math.abs(h[0].z);
						for (p <= f && (f = p, s.set(1, 0, 0)), m <= f && (f = m, s.set(0, 1, 0)), g <= f && s.set(0, 0, 1), u.crossVectors(h[0], s).normalize(), l[0].crossVectors(h[0], u), c[0].crossVectors(h[0], l[0]), i = 1; i <= t; i++) l[i] = l[i - 1].clone(), c[i] = c[i - 1].clone(), u.crossVectors(h[i - 1], h[i]), u.length() > Number.EPSILON && (u.normalize(), o = Math.acos(Ya.clamp(h[i - 1].dot(h[i]), -1, 1)), l[i].applyMatrix4(d.makeRotationAxis(u, o))), c[i].crossVectors(h[i], l[i]);
						if (!0 === e)
							for (o = Math.acos(Ya.clamp(l[0].dot(l[t]), -1, 1)), o /= t, h[0].dot(u.crossVectors(l[0], l[t])) > 0 && (o = -o), i = 1; i <= t; i++) l[i].applyMatrix4(d.makeRotationAxis(h[i], o * i)), c[i].crossVectors(h[i], l[i]);
						return {
							tangents: h,
							normals: l,
							binormals: c
						}
					}
				}), (zi.prototype = Object.create(Di.prototype)).constructor = zi, zi.prototype.isLineCurve = !0, zi.prototype.getPoint = function (t, e) {
					var n = e || new i;
					return 1 === t ? n.copy(this.v2) : (n.copy(this.v2).sub(this.v1), n.multiplyScalar(t).add(this.v1)), n
				}, zi.prototype.getPointAt = function (t, e) {
					return this.getPoint(t, e)
				}, zi.prototype.getTangent = function () {
					return this.v2.clone().sub(this.v1).normalize()
				}, ji.prototype = Object.assign(Object.create(Di.prototype), {
					constructor: ji,
					add: function (t) {
						this.curves.push(t)
					},
					closePath: function () {
						var t = this.curves[0].getPoint(0),
							e = this.curves[this.curves.length - 1].getPoint(1);
						t.equals(e) || this.curves.push(new zi(e, t))
					},
					getPoint: function (t) {
						for (var e = t * this.getLength(), i = this.getCurveLengths(), n = 0; n < i.length;) {
							if (i[n] >= e) {
								var r = i[n] - e,
									a = this.curves[n],
									o = a.getLength(),
									s = 0 === o ? 0 : 1 - r / o;
								return a.getPointAt(s)
							}
							n++
						}
						return null
					},
					getLength: function () {
						var t = this.getCurveLengths();
						return t[t.length - 1]
					},
					updateArcLengths: function () {
						this.needsUpdate = !0, this.cacheLengths = null, this.getCurveLengths()
					},
					getCurveLengths: function () {
						if (this.cacheLengths && this.cacheLengths.length === this.curves.length) return this.cacheLengths;
						for (var t = [], e = 0, i = 0, n = this.curves.length; i < n; i++) e += this.curves[i].getLength(), t.push(e);
						return this.cacheLengths = t, t
					},
					getSpacedPoints: function (t) {
						void 0 === t && (t = 40);
						for (var e = [], i = 0; i <= t; i++) e.push(this.getPoint(i / t));
						return this.autoClose && e.push(e[0]), e
					},
					getPoints: function (t) {
						t = t || 12;
						for (var e, i = [], n = 0, r = this.curves; n < r.length; n++)
							for (var a = r[n], o = a && a.isEllipseCurve ? 2 * t : a && a.isLineCurve ? 1 : a && a.isSplineCurve ? t * a.points.length : t, s = a.getPoints(o), h = 0; h < s.length; h++) {
								var l = s[h];
								e && e.equals(l) || (i.push(l), e = l)
							}
						return this.autoClose && i.length > 1 && !i[i.length - 1].equals(i[0]) && i.push(i[0]), i
					}
				}), (Ni.prototype = Object.create(Di.prototype)).constructor = Ni, Ni.prototype.isEllipseCurve = !0, Ni.prototype.getPoint = function (t, e) {
					for (var n = e || new i, r = 2 * Math.PI, a = this.aEndAngle - this.aStartAngle, o = Math.abs(a) < Number.EPSILON; a < 0;) a += r;
					for (; a > r;) a -= r;
					a < Number.EPSILON && (a = o ? 0 : r), !0 !== this.aClockwise || o || (a === r ? a = -r : a -= r);
					var s = this.aStartAngle + t * a,
						h = this.aX + this.xRadius * Math.cos(s),
						l = this.aY + this.yRadius * Math.sin(s);
					if (0 !== this.aRotation) {
						var c = Math.cos(this.aRotation),
							u = Math.sin(this.aRotation),
							d = h - this.aX,
							f = l - this.aY;
						h = d * c - f * u + this.aX, l = d * u + f * c + this.aY
					}
					return n.set(h, l)
				}, (Fi.prototype = Object.create(Di.prototype)).constructor = Fi, Fi.prototype.isSplineCurve = !0, Fi.prototype.getPoint = function (t, e) {
					var n = e || new i,
						r = this.points,
						a = (r.length - 1) * t,
						o = Math.floor(a),
						s = a - o,
						h = r[0 === o ? o : o - 1],
						l = r[o],
						c = r[o > r.length - 2 ? r.length - 1 : o + 1],
						u = r[o > r.length - 3 ? r.length - 1 : o + 2];
					return n.set(Ii(s, h.x, l.x, c.x, u.x), Ii(s, h.y, l.y, c.y, u.y)), n
				}, (Gi.prototype = Object.create(Di.prototype)).constructor = Gi, Gi.prototype.isCubicBezierCurve = !0, Gi.prototype.getPoint = function (t, e) {
					var n = e || new i,
						r = this.v0,
						a = this.v1,
						o = this.v2,
						s = this.v3;
					return n.set(Ui(t, r.x, a.x, o.x, s.x), Ui(t, r.y, a.y, o.y, s.y)), n
				}, (Hi.prototype = Object.create(Di.prototype)).constructor = Hi, Hi.prototype.isQuadraticBezierCurve = !0, Hi.prototype.getPoint = function (t, e) {
					var n = e || new i,
						r = this.v0,
						a = this.v1,
						o = this.v2;
					return n.set(Bi(t, r.x, a.x, o.x), Bi(t, r.y, a.y, o.y)), n
				};
				var Co = Object.assign(Object.create(ji.prototype), {
					fromPoints: function (t) {
						this.moveTo(t[0].x, t[0].y);
						for (var e = 1, i = t.length; e < i; e++) this.lineTo(t[e].x, t[e].y)
					},
					moveTo: function (t, e) {
						this.currentPoint.set(t, e)
					},
					lineTo: function (t, e) {
						var n = new zi(this.currentPoint.clone(), new i(t, e));
						this.curves.push(n), this.currentPoint.set(t, e)
					},
					quadraticCurveTo: function (t, e, n, r) {
						var a = new Hi(this.currentPoint.clone(), new i(t, e), new i(n, r));
						this.curves.push(a), this.currentPoint.set(n, r)
					},
					bezierCurveTo: function (t, e, n, r, a, o) {
						var s = new Gi(this.currentPoint.clone(), new i(t, e), new i(n, r), new i(a, o));
						this.curves.push(s), this.currentPoint.set(a, o)
					},
					splineThru: function (t) {
						var e = new Fi([this.currentPoint.clone()].concat(t));
						this.curves.push(e), this.currentPoint.copy(t[t.length - 1])
					},
					arc: function (t, e, i, n, r, a) {
						var o = this.currentPoint.x,
							s = this.currentPoint.y;
						this.absarc(t + o, e + s, i, n, r, a)
					},
					absarc: function (t, e, i, n, r, a) {
						this.absellipse(t, e, i, i, n, r, a)
					},
					ellipse: function (t, e, i, n, r, a, o, s) {
						var h = this.currentPoint.x,
							l = this.currentPoint.y;
						this.absellipse(t + h, e + l, i, n, r, a, o, s)
					},
					absellipse: function (t, e, i, n, r, a, o, s) {
						var h = new Ni(t, e, i, n, r, a, o, s);
						if (this.curves.length > 0) {
							var l = h.getPoint(0);
							l.equals(this.currentPoint) || this.lineTo(l.x, l.y)
						}
						this.curves.push(h);
						var c = h.getPoint(1);
						this.currentPoint.copy(c)
					}
				});
				Vi.prototype = Co, Co.constructor = Vi, Wi.prototype = Object.assign(Object.create(Co), {
					constructor: Wi,
					getPointsHoles: function (t) {
						for (var e = [], i = 0, n = this.holes.length; i < n; i++) e[i] = this.holes[i].getPoints(t);
						return e
					},
					extractAllPoints: function (t) {
						return {
							shape: this.getPoints(t),
							holes: this.getPointsHoles(t)
						}
					},
					extractPoints: function (t) {
						return this.extractAllPoints(t)
					}
				}), Object.assign(qi.prototype, {
					moveTo: function (t, e) {
						this.currentPath = new Vi, this.subPaths.push(this.currentPath), this.currentPath.moveTo(t, e)
					},
					lineTo: function (t, e) {
						this.currentPath.lineTo(t, e)
					},
					quadraticCurveTo: function (t, e, i, n) {
						this.currentPath.quadraticCurveTo(t, e, i, n)
					},
					bezierCurveTo: function (t, e, i, n, r, a) {
						this.currentPath.bezierCurveTo(t, e, i, n, r, a)
					},
					splineThru: function (t) {
						this.currentPath.splineThru(t)
					},
					toShapes: function (t, e) {
						function i(t) {
							for (var e = [], i = 0, n = t.length; i < n; i++) {
								var r = t[i],
									a = new Wi;
								a.curves = r.curves, e.push(a)
							}
							return e
						}

						function n(t, e) {
							for (var i = e.length, n = !1, r = i - 1, a = 0; a < i; r = a++) {
								var o = e[r],
									s = e[a],
									h = s.x - o.x,
									l = s.y - o.y;
								if (Math.abs(l) > Number.EPSILON) {
									if (l < 0 && (o = e[a], h = -h, s = e[r], l = -l), t.y < o.y || t.y > s.y) continue;
									if (t.y === o.y) {
										if (t.x === o.x) return !0
									} else {
										var c = l * (t.x - o.x) - h * (t.y - o.y);
										if (0 === c) return !0;
										if (c < 0) continue;
										n = !n
									}
								} else {
									if (t.y !== o.y) continue;
									if (s.x <= t.x && t.x <= o.x || o.x <= t.x && t.x <= s.x) return !0
								}
							}
							return n
						}
						var r = mo.isClockWise,
							a = this.subPaths;
						if (0 === a.length) return [];
						if (!0 === e) return i(a);
						var o, s, h, l = [];
						if (1 === a.length) return s = a[0], h = new Wi, h.curves = s.curves, l.push(h), l;
						var c = !r(a[0].getPoints());
						c = t ? !c : c;
						var u, d = [],
							f = [],
							p = [],
							m = 0;
						f[m] = void 0, p[m] = [];
						for (var g = 0, v = a.length; g < v; g++) o = r(u = (s = a[g]).getPoints()), (o = t ? !o : o) ? (!c && f[m] && m++, f[m] = {
							s: new Wi,
							p: u
						}, f[m].s.curves = s.curves, c && m++, p[m] = []) : p[m].push({
							h: s,
							p: u[0]
						});
						if (!f[0]) return i(a);
						if (f.length > 1) {
							for (var y = !1, b = [], x = 0, _ = f.length; x < _; x++) d[x] = [];
							for (var x = 0, _ = f.length; x < _; x++)
								for (var w = p[x], M = 0; M < w.length; M++) {
									for (var T = w[M], S = !0, E = 0; E < f.length; E++) n(T.p, f[E].p) && (x !== E && b.push({
										froms: x,
										tos: E,
										hole: M
									}), S ? (S = !1, d[E].push(T)) : y = !0);
									S && d[x].push(T)
								}
							b.length > 0 && (y || (p = d))
						}
						for (var C, g = 0, P = f.length; g < P; g++) {
							h = f[g].s, l.push(h);
							for (var k = 0, A = (C = p[g]).length; k < A; k++) h.holes.push(C[k].h)
						}
						return l
					}
				}), Object.assign(Xi.prototype, {
					isFont: !0,
					generateShapes: function (t, e, i) {
						function n(t) {
							for (var n = String(t).split(""), a = e / r.resolution, o = (r.boundingBox.yMax - r.boundingBox.yMin + r.underlineThickness) * a, s = 0, h = 0, l = [], c = 0; c < n.length; c++) {
								var u = n[c];
								if ("\n" === u) s = 0, h -= o;
								else {
									var d = function (t, e, n, a) {
										var o = r.glyphs[t] || r.glyphs["?"];
										if (!o) return;
										var s, h, l, c, u, d, f, p, m, g, v, y = new qi,
											b = [];
										if (o.o)
											for (var x = o._cachedOutline || (o._cachedOutline = o.o.split(" ")), _ = 0, w = x.length; _ < w;) {
												switch (x[_++]) {
													case "m":
														s = x[_++] * e + n, h = x[_++] * e + a, y.moveTo(s, h);
														break;
													case "l":
														s = x[_++] * e + n, h = x[_++] * e + a, y.lineTo(s, h);
														break;
													case "q":
														if (l = x[_++] * e + n, c = x[_++] * e + a, f = x[_++] * e + n, p = x[_++] * e + a, y.quadraticCurveTo(f, p, l, c), v = b[b.length - 1]) {
															u = v.x, d = v.y;
															for (M = 1; M <= i; M++) {
																Bi(T = M / i, u, f, l), Bi(T, d, p, c)
															}
														}
														break;
													case "b":
														if (l = x[_++] * e + n, c = x[_++] * e + a, f = x[_++] * e + n, p = x[_++] * e + a, m = x[_++] * e + n, g = x[_++] * e + a, y.bezierCurveTo(f, p, m, g, l, c), v = b[b.length - 1]) {
															u = v.x, d = v.y;
															for (var M = 1; M <= i; M++) {
																var T = M / i;
																Ui(T, u, f, m, l), Ui(T, d, p, g, c)
															}
														}
												}
											}
										return {
											offsetX: o.ha * e,
											path: y
										}
									}(u, a, s, h);
									s += d.offsetX, l.push(d.path)
								}
							}
							return l
						}
						void 0 === e && (e = 100), void 0 === i && (i = 4);
						for (var r = this.data, a = n(t), o = [], s = 0, h = a.length; s < h; s++) Array.prototype.push.apply(o, a[s].toShapes());
						return o
					}
				}), Object.assign(Ki.prototype, {
					load: function (t, e, i, n) {
						var r;
						new $e(this.manager);
						try {
							r = JSON.parse(t)
						} catch (e) {
							console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."), r = JSON.parse(t.substring(65, t.length - 2))
						}
						var a = this.parse(r);
						e && e(a)
					},
					parse: function (t) {
						return new Xi(t)
					},
					setPath: function (t) {
						return this.path = t, this
					}
				});
				var Po, ko = {
					getContext: function () {
						return void 0 === Po && (Po = new(window.AudioContext || window.webkitAudioContext)), Po
					},
					setContext: function (t) {
						Po = t
					}
				};
				Object.assign(Yi.prototype, {
						load: function (t, e, i, n) {
							var r = new $e(this.manager);
							r.setResponseType("arraybuffer"), r.load(t, function (t) {
								ko.getContext().decodeAudioData(t, function (t) {
									e(t)
								})
							}, i, n)
						}
					}), Object.assign(Zi.prototype, {
						update: function () {
							var t, e, i, r, a, o, s, h, l = new n,
								c = new n;
							return function (n) {
								if (t !== this || e !== n.focus || i !== n.fov || r !== n.aspect * this.aspect || a !== n.near || o !== n.far || s !== n.zoom || h !== this.eyeSep) {
									t = this, e = n.focus, i = n.fov, r = n.aspect * this.aspect, a = n.near, o = n.far, s = n.zoom;
									var u, d, f = n.projectionMatrix.clone(),
										p = (h = this.eyeSep / 2) * a / e,
										m = a * Math.tan(Ya.DEG2RAD * i * .5) / s;
									c.elements[12] = -h, l.elements[12] = h, u = -m * r + p, d = m * r + p, f.elements[0] = 2 * a / (d - u), f.elements[8] = (d + u) / (d - u), this.cameraL.projectionMatrix.copy(f), u = -m * r - p, d = m * r - p, f.elements[0] = 2 * a / (d - u), f.elements[8] = (d + u) / (d - u), this.cameraR.projectionMatrix.copy(f)
								}
								this.cameraL.matrixWorld.copy(n.matrixWorld).multiply(c), this.cameraR.matrixWorld.copy(n.matrixWorld).multiply(l)
							}
						}()
					}), Ji.prototype = Object.assign(Object.create(ht.prototype), {
						constructor: Ji,
						getInput: function () {
							return this.gain
						},
						removeFilter: function () {
							null !== this.filter && (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination), this.gain.connect(this.context.destination), this.filter = null)
						},
						getFilter: function () {
							return this.filter
						},
						setFilter: function (t) {
							null !== this.filter ? (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination)) : this.gain.disconnect(this.context.destination), this.filter = t, this.gain.connect(this.filter), this.filter.connect(this.context.destination)
						},
						getMasterVolume: function () {
							return this.gain.gain.value
						},
						setMasterVolume: function (t) {
							this.gain.gain.value = t
						},
						updateMatrixWorld: function () {
							var t = new a,
								e = new r,
								i = new a,
								n = new a;
							return function (r) {
								ht.prototype.updateMatrixWorld.call(this, r);
								var a = this.context.listener,
									o = this.up;
								this.matrixWorld.decompose(t, e, i), n.set(0, 0, -1).applyQuaternion(e), a.positionX ? (a.positionX.setValueAtTime(t.x, this.context.currentTime), a.positionY.setValueAtTime(t.y, this.context.currentTime), a.positionZ.setValueAtTime(t.z, this.context.currentTime), a.forwardX.setValueAtTime(n.x, this.context.currentTime), a.forwardY.setValueAtTime(n.y, this.context.currentTime), a.forwardZ.setValueAtTime(n.z, this.context.currentTime), a.upX.setValueAtTime(o.x, this.context.currentTime), a.upY.setValueAtTime(o.y, this.context.currentTime), a.upZ.setValueAtTime(o.z, this.context.currentTime)) : (a.setPosition(t.x, t.y, t.z), a.setOrientation(n.x, n.y, n.z, o.x, o.y, o.z))
							}
						}()
					}), Qi.prototype = Object.assign(Object.create(ht.prototype), {
						constructor: Qi,
						getOutput: function () {
							return this.gain
						},
						setNodeSource: function (t) {
							return this.hasPlaybackControl = !1, this.sourceType = "audioNode", this.source = t, this.connect(), this
						},
						setBuffer: function (t) {
							return this.buffer = t, this.sourceType = "buffer", this.autoplay && this.play(), this
						},
						play: function () {
							if (!0 !== this.isPlaying) {
								if (!1 !== this.hasPlaybackControl) {
									var t = this.context.createBufferSource();
									return t.buffer = this.buffer, t.loop = this.loop, t.onended = this.onEnded.bind(this), t.playbackRate.setValueAtTime(this.playbackRate, this.startTime), this.startTime = this.context.currentTime, t.start(this.startTime, this.offset), this.isPlaying = !0, this.source = t, this.connect()
								}
								console.warn("THREE.Audio: this Audio has no playback control.")
							} else console.warn("THREE.Audio: Audio is already playing.")
						},
						pause: function () {
							if (!1 !== this.hasPlaybackControl) return !0 === this.isPlaying && (this.source.stop(), this.offset += (this.context.currentTime - this.startTime) * this.playbackRate, this.isPlaying = !1), this;
							console.warn("THREE.Audio: this Audio has no playback control.")
						},
						stop: function () {
							if (!1 !== this.hasPlaybackControl) return this.source.stop(), this.offset = 0, this.isPlaying = !1, this;
							console.warn("THREE.Audio: this Audio has no playback control.")
						},
						connect: function () {
							if (this.filters.length > 0) {
								this.source.connect(this.filters[0]);
								for (var t = 1, e = this.filters.length; t < e; t++) this.filters[t - 1].connect(this.filters[t]);
								this.filters[this.filters.length - 1].connect(this.getOutput())
							} else this.source.connect(this.getOutput());
							return this
						},
						disconnect: function () {
							if (this.filters.length > 0) {
								this.source.disconnect(this.filters[0]);
								for (var t = 1, e = this.filters.length; t < e; t++) this.filters[t - 1].disconnect(this.filters[t]);
								this.filters[this.filters.length - 1].disconnect(this.getOutput())
							} else this.source.disconnect(this.getOutput());
							return this
						},
						getFilters: function () {
							return this.filters
						},
						setFilters: function (t) {
							return t || (t = []), !0 === this.isPlaying ? (this.disconnect(), this.filters = t, this.connect()) : this.filters = t, this
						},
						getFilter: function () {
							return this.getFilters()[0]
						},
						setFilter: function (t) {
							return this.setFilters(t ? [t] : [])
						},
						setPlaybackRate: function (t) {
							if (!1 !== this.hasPlaybackControl) return this.playbackRate = t, !0 === this.isPlaying && this.source.playbackRate.setValueAtTime(this.playbackRate, this.context.currentTime), this;
							console.warn("THREE.Audio: this Audio has no playback control.")
						},
						getPlaybackRate: function () {
							return this.playbackRate
						},
						onEnded: function () {
							this.isPlaying = !1
						},
						getLoop: function () {
							return !1 === this.hasPlaybackControl ? (console.warn("THREE.Audio: this Audio has no playback control."), !1) : this.loop
						},
						setLoop: function (t) {
							if (!1 !== this.hasPlaybackControl) return this.loop = t, !0 === this.isPlaying && (this.source.loop = this.loop), this;
							console.warn("THREE.Audio: this Audio has no playback control.")
						},
						getVolume: function () {
							return this.gain.gain.value
						},
						setVolume: function (t) {
							return this.gain.gain.value = t, this
						}
					}), $i.prototype = Object.assign(Object.create(Qi.prototype), {
						constructor: $i,
						getOutput: function () {
							return this.panner
						},
						getRefDistance: function () {
							return this.panner.refDistance
						},
						setRefDistance: function (t) {
							this.panner.refDistance = t
						},
						getRolloffFactor: function () {
							return this.panner.rolloffFactor
						},
						setRolloffFactor: function (t) {
							this.panner.rolloffFactor = t
						},
						getDistanceModel: function () {
							return this.panner.distanceModel
						},
						setDistanceModel: function (t) {
							this.panner.distanceModel = t
						},
						getMaxDistance: function () {
							return this.panner.maxDistance
						},
						setMaxDistance: function (t) {
							this.panner.maxDistance = t
						},
						updateMatrixWorld: function () {
							var t = new a;
							return function (e) {
								ht.prototype.updateMatrixWorld.call(this, e), t.setFromMatrixPosition(this.matrixWorld), this.panner.setPosition(t.x, t.y, t.z)
							}
						}()
					}), Object.assign(tn.prototype, {
						getFrequencyData: function () {
							return this.analyser.getByteFrequencyData(this.data), this.data
						},
						getAverageFrequency: function () {
							for (var t = 0, e = this.getFrequencyData(), i = 0; i < e.length; i++) t += e[i];
							return t / e.length
						}
					}), Object.assign(en.prototype, {
						accumulate: function (t, e) {
							var i = this.buffer,
								n = this.valueSize,
								r = t * n + n,
								a = this.cumulativeWeight;
							if (0 === a) {
								for (var o = 0; o !== n; ++o) i[r + o] = i[o];
								a = e
							} else {
								var s = e / (a += e);
								this._mixBufferRegion(i, r, 0, s, n)
							}
							this.cumulativeWeight = a
						},
						apply: function (t) {
							var e = this.valueSize,
								i = this.buffer,
								n = t * e + e,
								r = this.cumulativeWeight,
								a = this.binding;
							if (this.cumulativeWeight = 0, r < 1) {
								var o = 3 * e;
								this._mixBufferRegion(i, n, o, 1 - r, e)
							}
							for (var s = e, h = e + e; s !== h; ++s)
								if (i[s] !== i[s + e]) {
									a.setValue(i, n);
									break
								}
						},
						saveOriginalState: function () {
							var t = this.binding,
								e = this.buffer,
								i = this.valueSize,
								n = 3 * i;
							t.getValue(e, n);
							for (var r = i, a = n; r !== a; ++r) e[r] = e[n + r % i];
							this.cumulativeWeight = 0
						},
						restoreOriginalState: function () {
							var t = 3 * this.valueSize;
							this.binding.setValue(this.buffer, t)
						},
						_select: function (t, e, i, n, r) {
							if (n >= .5)
								for (var a = 0; a !== r; ++a) t[e + a] = t[i + a]
						},
						_slerp: function (t, e, i, n) {
							r.slerpFlat(t, e, t, e, t, i, n)
						},
						_lerp: function (t, e, i, n, r) {
							for (var a = 1 - n, o = 0; o !== r; ++o) {
								var s = e + o;
								t[s] = t[s] * a + t[i + o] * n
							}
						}
					}), Object.assign(nn.prototype, {
						getValue: function (t, e) {
							this.bind();
							var i = this._targetGroup.nCachedObjects_,
								n = this._bindings[i];
							void 0 !== n && n.getValue(t, e)
						},
						setValue: function (t, e) {
							for (var i = this._bindings, n = this._targetGroup.nCachedObjects_, r = i.length; n !== r; ++n) i[n].setValue(t, e)
						},
						bind: function () {
							for (var t = this._bindings, e = this._targetGroup.nCachedObjects_, i = t.length; e !== i; ++e) t[e].bind()
						},
						unbind: function () {
							for (var t = this._bindings, e = this._targetGroup.nCachedObjects_, i = t.length; e !== i; ++e) t[e].unbind()
						}
					}), Object.assign(rn, {
						Composite: nn,
						create: function (t, e, i) {
							return t && t.isAnimationObjectGroup ? new rn.Composite(t, e, i) : new rn(t, e, i)
						},
						sanitizeNodeName: function (t) {
							return t.replace(/\s/g, "_").replace(/[^\w-]/g, "")
						},
						parseTrackName: function () {
							var t = new RegExp("^" + /((?:[\w-]+[\/:])*)/.source + /([\w-\.]+)?/.source + /(?:\.([\w-]+)(?:\[(.+)\])?)?/.source + /\.([\w-]+)(?:\[(.+)\])?/.source + "$"),
								e = ["material", "materials", "bones"];
							return function (i) {
								var n = t.exec(i);
								if (!n) throw new Error("PropertyBinding: Cannot parse trackName: " + i);
								var r = {
										nodeName: n[2],
										objectName: n[3],
										objectIndex: n[4],
										propertyName: n[5],
										propertyIndex: n[6]
									},
									a = r.nodeName && r.nodeName.lastIndexOf(".");
								if (void 0 !== a && -1 !== a) {
									var o = r.nodeName.substring(a + 1); - 1 !== e.indexOf(o) && (r.nodeName = r.nodeName.substring(0, a), r.objectName = o)
								}
								if (null === r.propertyName || 0 === r.propertyName.length) throw new Error("PropertyBinding: can not parse propertyName from trackName: " + i);
								return r
							}
						}(),
						findNode: function (t, e) {
							if (!e || "" === e || "root" === e || "." === e || -1 === e || e === t.name || e === t.uuid) return t;
							if (t.skeleton) {
								var i = function (t) {
									for (var i = 0; i < t.bones.length; i++) {
										var n = t.bones[i];
										if (n.name === e) return n
									}
									return null
								}(t.skeleton);
								if (i) return i
							}
							if (t.children) {
								var n = function t(i) {
									for (var n = 0; n < i.length; n++) {
										var r = i[n];
										if (r.name === e || r.uuid === e) return r;
										var a = t(r.children);
										if (a) return a
									}
									return null
								}(t.children);
								if (n) return n
							}
							return null
						}
					}), Object.assign(rn.prototype, {
						_getValue_unavailable: function () {},
						_setValue_unavailable: function () {},
						BindingType: {
							Direct: 0,
							EntireArray: 1,
							ArrayElement: 2,
							HasFromToArray: 3
						},
						Versioning: {
							None: 0,
							NeedsUpdate: 1,
							MatrixWorldNeedsUpdate: 2
						},
						GetterByBindingType: [function (t, e) {
							t[e] = this.node[this.propertyName]
						}, function (t, e) {
							for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) t[e++] = i[n]
						}, function (t, e) {
							t[e] = this.resolvedProperty[this.propertyIndex]
						}, function (t, e) {
							this.resolvedProperty.toArray(t, e)
						}],
						SetterByBindingTypeAndVersioning: [
							[function (t, e) {
								this.targetObject[this.propertyName] = t[e]
							}, function (t, e) {
								this.targetObject[this.propertyName] = t[e], this.targetObject.needsUpdate = !0
							}, function (t, e) {
								this.targetObject[this.propertyName] = t[e], this.targetObject.matrixWorldNeedsUpdate = !0
							}],
							[function (t, e) {
								for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = t[e++]
							}, function (t, e) {
								for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = t[e++];
								this.targetObject.needsUpdate = !0
							}, function (t, e) {
								for (var i = this.resolvedProperty, n = 0, r = i.length; n !== r; ++n) i[n] = t[e++];
								this.targetObject.matrixWorldNeedsUpdate = !0
							}],
							[function (t, e) {
								this.resolvedProperty[this.propertyIndex] = t[e]
							}, function (t, e) {
								this.resolvedProperty[this.propertyIndex] = t[e], this.targetObject.needsUpdate = !0
							}, function (t, e) {
								this.resolvedProperty[this.propertyIndex] = t[e], this.targetObject.matrixWorldNeedsUpdate = !0
							}],
							[function (t, e) {
								this.resolvedProperty.fromArray(t, e)
							}, function (t, e) {
								this.resolvedProperty.fromArray(t, e), this.targetObject.needsUpdate = !0
							}, function (t, e) {
								this.resolvedProperty.fromArray(t, e), this.targetObject.matrixWorldNeedsUpdate = !0
							}]
						],
						getValue: function (t, e) {
							this.bind(), this.getValue(t, e)
						},
						setValue: function (t, e) {
							this.bind(), this.setValue(t, e)
						},
						bind: function () {
							var t = this.node,
								e = this.parsedPath,
								i = e.objectName,
								n = e.propertyName,
								r = e.propertyIndex;
							if (t || (t = rn.findNode(this.rootNode, e.nodeName) || this.rootNode, this.node = t), this.getValue = this._getValue_unavailable, this.setValue = this._setValue_unavailable, t) {
								if (i) {
									var a = e.objectIndex;
									switch (i) {
										case "materials":
											if (!t.material) return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.", this);
											if (!t.material.materials) return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.", this);
											t = t.material.materials;
											break;
										case "bones":
											if (!t.skeleton) return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.", this);
											t = t.skeleton.bones;
											for (l = 0; l < t.length; l++)
												if (t[l].name === a) {
													a = l;
													break
												}
											break;
										default:
											if (void 0 === t[i]) return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.", this);
											t = t[i]
									}
									if (void 0 !== a) {
										if (void 0 === t[a]) return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.", this, t);
										t = t[a]
									}
								}
								var o = t[n];
								if (void 0 !== o) {
									var s = this.Versioning.None;
									void 0 !== t.needsUpdate ? (s = this.Versioning.NeedsUpdate, this.targetObject = t) : void 0 !== t.matrixWorldNeedsUpdate && (s = this.Versioning.MatrixWorldNeedsUpdate, this.targetObject = t);
									var h = this.BindingType.Direct;
									if (void 0 !== r) {
										if ("morphTargetInfluences" === n) {
											if (!t.geometry) return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.", this);
											if (t.geometry.isBufferGeometry) {
												if (!t.geometry.morphAttributes) return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.", this);
												for (l = 0; l < this.node.geometry.morphAttributes.position.length; l++)
													if (t.geometry.morphAttributes.position[l].name === r) {
														r = l;
														break
													}
											} else {
												if (!t.geometry.morphTargets) return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.", this);
												for (var l = 0; l < this.node.geometry.morphTargets.length; l++)
													if (t.geometry.morphTargets[l].name === r) {
														r = l;
														break
													}
											}
										}
										h = this.BindingType.ArrayElement, this.resolvedProperty = o, this.propertyIndex = r
									} else void 0 !== o.fromArray && void 0 !== o.toArray ? (h = this.BindingType.HasFromToArray, this.resolvedProperty = o) : Array.isArray(o) ? (h = this.BindingType.EntireArray, this.resolvedProperty = o) : this.propertyName = n;
									this.getValue = this.GetterByBindingType[h], this.setValue = this.SetterByBindingTypeAndVersioning[h][s]
								} else {
									var c = e.nodeName;
									console.error("THREE.PropertyBinding: Trying to update property for track: " + c + "." + n + " but it wasn't found.", t)
								}
							} else console.error("THREE.PropertyBinding: Trying to update node for track: " + this.path + " but it wasn't found.")
						},
						unbind: function () {
							this.node = null, this.getValue = this._getValue_unbound, this.setValue = this._setValue_unbound
						}
					}), //!\ DECLARE ALIAS AFTER assign prototype !
					Object.assign(rn.prototype, {
						_getValue_unbound: rn.prototype.getValue,
						_setValue_unbound: rn.prototype.setValue
					}), Object.assign(an.prototype, {
						isAnimationObjectGroup: !0,
						add: function () {
							for (var t = this._objects, e = t.length, i = this.nCachedObjects_, n = this._indicesByUUID, r = this._paths, a = this._parsedPaths, o = this._bindings, s = o.length, h = 0, l = arguments.length; h !== l; ++h) {
								var c = arguments[h],
									u = c.uuid,
									d = n[u],
									f = void 0;
								if (void 0 === d) {
									d = e++, n[u] = d, t.push(c);
									for (var p = 0, m = s; p !== m; ++p) o[p].push(new rn(c, r[p], a[p]))
								} else if (d < i) {
									f = t[d];
									var g = --i,
										v = t[g];
									n[v.uuid] = d, t[d] = v, n[u] = g, t[g] = c;
									for (var p = 0, m = s; p !== m; ++p) {
										var y = o[p],
											b = y[g],
											x = y[d];
										y[d] = b, void 0 === x && (x = new rn(c, r[p], a[p])), y[g] = x
									}
								} else t[d] !== f && console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")
							}
							this.nCachedObjects_ = i
						},
						remove: function () {
							for (var t = this._objects, e = this.nCachedObjects_, i = this._indicesByUUID, n = this._bindings, r = n.length, a = 0, o = arguments.length; a !== o; ++a) {
								var s = arguments[a],
									h = s.uuid,
									l = i[h];
								if (void 0 !== l && l >= e) {
									var c = e++,
										u = t[c];
									i[u.uuid] = l, t[l] = u, i[h] = c, t[c] = s;
									for (var d = 0, f = r; d !== f; ++d) {
										var p = n[d],
											m = p[c],
											g = p[l];
										p[l] = m, p[c] = g
									}
								}
							}
							this.nCachedObjects_ = e
						},
						uncache: function () {
							for (var t = this._objects, e = t.length, i = this.nCachedObjects_, n = this._indicesByUUID, r = this._bindings, a = r.length, o = 0, s = arguments.length; o !== s; ++o) {
								var h = arguments[o].uuid,
									l = n[h];
								if (void 0 !== l)
									if (delete n[h], l < i) {
										var c = --i,
											u = t[c],
											d = t[v = --e];
										n[u.uuid] = l, t[l] = u, n[d.uuid] = c, t[c] = d, t.pop();
										for (var f = 0, p = a; f !== p; ++f) {
											var m = (y = r[f])[c],
												g = y[v];
											y[l] = m, y[c] = g, y.pop()
										}
									} else {
										var v = --e;
										n[(d = t[v]).uuid] = l, t[l] = d, t.pop();
										for (var f = 0, p = a; f !== p; ++f) {
											var y = r[f];
											y[l] = y[v], y.pop()
										}
									}
							}
							this.nCachedObjects_ = i
						},
						subscribe_: function (t, e) {
							var i = this._bindingsIndicesByPath,
								n = i[t],
								r = this._bindings;
							if (void 0 !== n) return r[n];
							var a = this._paths,
								o = this._parsedPaths,
								s = this._objects,
								h = s.length,
								l = this.nCachedObjects_,
								c = new Array(h);
							n = r.length, i[t] = n, a.push(t), o.push(e), r.push(c);
							for (var u = l, d = s.length; u !== d; ++u) {
								var f = s[u];
								c[u] = new rn(f, t, e)
							}
							return c
						},
						unsubscribe_: function (t) {
							var e = this._bindingsIndicesByPath,
								i = e[t];
							if (void 0 !== i) {
								var n = this._paths,
									r = this._parsedPaths,
									a = this._bindings,
									o = a.length - 1,
									s = a[o];
								e[t[o]] = i, a[i] = s, a.pop(), r[i] = r[o], r.pop(), n[i] = n[o], n.pop()
							}
						}
					}), Object.assign(on.prototype, {
						play: function () {
							return this._mixer._activateAction(this), this
						},
						stop: function () {
							return this._mixer._deactivateAction(this), this.reset()
						},
						reset: function () {
							return this.paused = !1, this.enabled = !0, this.time = 0, this._loopCount = -1, this._startTime = null, this.stopFading().stopWarping()
						},
						isRunning: function () {
							return this.enabled && !this.paused && 0 !== this.timeScale && null === this._startTime && this._mixer._isActiveAction(this)
						},
						isScheduled: function () {
							return this._mixer._isActiveAction(this)
						},
						startAt: function (t) {
							return this._startTime = t, this
						},
						setLoop: function (t, e) {
							return this.loop = t, this.repetitions = e, this
						},
						setEffectiveWeight: function (t) {
							return this.weight = t, this._effectiveWeight = this.enabled ? t : 0, this.stopFading()
						},
						getEffectiveWeight: function () {
							return this._effectiveWeight
						},
						fadeIn: function (t) {
							return this._scheduleFading(t, 0, 1)
						},
						fadeOut: function (t) {
							return this._scheduleFading(t, 1, 0)
						},
						crossFadeFrom: function (t, e, i) {
							if (t.fadeOut(e), this.fadeIn(e), i) {
								var n = this._clip.duration,
									r = t._clip.duration,
									a = r / n,
									o = n / r;
								t.warp(1, a, e), this.warp(o, 1, e)
							}
							return this
						},
						crossFadeTo: function (t, e, i) {
							return t.crossFadeFrom(this, e, i)
						},
						stopFading: function () {
							var t = this._weightInterpolant;
							return null !== t && (this._weightInterpolant = null, this._mixer._takeBackControlInterpolant(t)), this
						},
						setEffectiveTimeScale: function (t) {
							return this.timeScale = t, this._effectiveTimeScale = this.paused ? 0 : t, this.stopWarping()
						},
						getEffectiveTimeScale: function () {
							return this._effectiveTimeScale
						},
						setDuration: function (t) {
							return this.timeScale = this._clip.duration / t, this.stopWarping()
						},
						syncWith: function (t) {
							return this.time = t.time, this.timeScale = t.timeScale, this.stopWarping()
						},
						halt: function (t) {
							return this.warp(this._effectiveTimeScale, 0, t)
						},
						warp: function (t, e, i) {
							var n = this._mixer,
								r = n.time,
								a = this._timeScaleInterpolant,
								o = this.timeScale;
							null === a && (a = n._lendControlInterpolant(), this._timeScaleInterpolant = a);
							var s = a.parameterPositions,
								h = a.sampleValues;
							return s[0] = r, s[1] = r + i, h[0] = t / o, h[1] = e / o, this
						},
						stopWarping: function () {
							var t = this._timeScaleInterpolant;
							return null !== t && (this._timeScaleInterpolant = null, this._mixer._takeBackControlInterpolant(t)), this
						},
						getMixer: function () {
							return this._mixer
						},
						getClip: function () {
							return this._clip
						},
						getRoot: function () {
							return this._localRoot || this._mixer._root
						},
						_update: function (t, e, i, n) {
							if (this.enabled) {
								var r = this._startTime;
								if (null !== r) {
									var a = (t - r) * i;
									if (a < 0 || 0 === i) return;
									this._startTime = null, e = i * a
								}
								e *= this._updateTimeScale(t);
								var o = this._updateTime(e),
									s = this._updateWeight(t);
								if (s > 0)
									for (var h = this._interpolants, l = this._propertyBindings, c = 0, u = h.length; c !== u; ++c) h[c].evaluate(o), l[c].accumulate(n, s)
							} else this._updateWeight(t)
						},
						_updateWeight: function (t) {
							var e = 0;
							if (this.enabled) {
								e = this.weight;
								var i = this._weightInterpolant;
								if (null !== i) {
									var n = i.evaluate(t)[0];
									e *= n, t > i.parameterPositions[1] && (this.stopFading(), 0 === n && (this.enabled = !1))
								}
							}
							return this._effectiveWeight = e, e
						},
						_updateTimeScale: function (t) {
							var e = 0;
							if (!this.paused) {
								e = this.timeScale;
								var i = this._timeScaleInterpolant;
								if (null !== i) {
									e *= i.evaluate(t)[0], t > i.parameterPositions[1] && (this.stopWarping(), 0 === e ? this.paused = !0 : this.timeScale = e)
								}
							}
							return this._effectiveTimeScale = e, e
						},
						_updateTime: function (t) {
							var e = this.time + t;
							if (0 === t) return e;
							var i = this._clip.duration,
								n = this.loop,
								r = this._loopCount;
							if (2200 === n) {
								-1 === r && (this._loopCount = 0, this._setEndings(!0, !0, !1));
								t: {
									if (e >= i) e = i;
									else {
										if (!(e < 0)) break t;
										e = 0
									}
									this.clampWhenFinished ? this.paused = !0 : this.enabled = !1,
									this._mixer.dispatchEvent({
										type: "finished",
										action: this,
										direction: t < 0 ? -1 : 1
									})
								}
							} else {
								var a = 2202 === n;
								if (-1 === r && (t >= 0 ? (r = 0, this._setEndings(!0, 0 === this.repetitions, a)) : this._setEndings(0 === this.repetitions, !0, a)), e >= i || e < 0) {
									var o = Math.floor(e / i);
									e -= i * o, r += Math.abs(o);
									var s = this.repetitions - r;
									if (s < 0) this.clampWhenFinished ? this.paused = !0 : this.enabled = !1, e = t > 0 ? i : 0, this._mixer.dispatchEvent({
										type: "finished",
										action: this,
										direction: t > 0 ? 1 : -1
									});
									else {
										if (0 === s) {
											var h = t < 0;
											this._setEndings(h, !h, a)
										} else this._setEndings(!1, !1, a);
										this._loopCount = r, this._mixer.dispatchEvent({
											type: "loop",
											action: this,
											loopDelta: o
										})
									}
								}
								if (a && 1 == (1 & r)) return this.time = e, i - e
							}
							return this.time = e, e
						},
						_setEndings: function (t, e, i) {
							var n = this._interpolantSettings;
							i ? (n.endingStart = 2401, n.endingEnd = 2401) : (n.endingStart = t ? this.zeroSlopeAtStart ? 2401 : Ua : 2402, n.endingEnd = e ? this.zeroSlopeAtEnd ? 2401 : Ua : 2402)
						},
						_scheduleFading: function (t, e, i) {
							var n = this._mixer,
								r = n.time,
								a = this._weightInterpolant;
							null === a && (a = n._lendControlInterpolant(), this._weightInterpolant = a);
							var o = a.parameterPositions,
								s = a.sampleValues;
							return o[0] = r, s[0] = e, o[1] = r + t, s[1] = i, this
						}
					}), Object.assign(sn.prototype, e.prototype, {
						_bindAction: function (t, e) {
							var i = t._localRoot || this._root,
								n = t._clip.tracks,
								r = n.length,
								a = t._propertyBindings,
								o = t._interpolants,
								s = i.uuid,
								h = this._bindingsByRootAndName,
								l = h[s];
							void 0 === l && (l = {}, h[s] = l);
							for (var c = 0; c !== r; ++c) {
								var u = n[c],
									d = u.name,
									f = l[d];
								if (void 0 !== f) a[c] = f;
								else {
									if (void 0 !== (f = a[c])) {
										null === f._cacheIndex && (++f.referenceCount, this._addInactiveBinding(f, s, d));
										continue
									}
									var p = e && e._propertyBindings[c].binding.parsedPath;
									++(f = new en(rn.create(i, d, p), u.ValueTypeName, u.getValueSize())).referenceCount, this._addInactiveBinding(f, s, d), a[c] = f
								}
								o[c].resultBuffer = f.buffer
							}
						},
						_activateAction: function (t) {
							if (!this._isActiveAction(t)) {
								if (null === t._cacheIndex) {
									var e = (t._localRoot || this._root).uuid,
										i = t._clip.uuid,
										n = this._actionsByClip[i];
									this._bindAction(t, n && n.knownActions[0]), this._addInactiveAction(t, i, e)
								}
								for (var r = t._propertyBindings, a = 0, o = r.length; a !== o; ++a) {
									var s = r[a];
									0 == s.useCount++ && (this._lendBinding(s), s.saveOriginalState())
								}
								this._lendAction(t)
							}
						},
						_deactivateAction: function (t) {
							if (this._isActiveAction(t)) {
								for (var e = t._propertyBindings, i = 0, n = e.length; i !== n; ++i) {
									var r = e[i];
									0 == --r.useCount && (r.restoreOriginalState(), this._takeBackBinding(r))
								}
								this._takeBackAction(t)
							}
						},
						_initMemoryManager: function () {
							this._actions = [], this._nActiveActions = 0, this._actionsByClip = {}, this._bindings = [], this._nActiveBindings = 0, this._bindingsByRootAndName = {}, this._controlInterpolants = [], this._nActiveControlInterpolants = 0;
							var t = this;
							this.stats = {
								actions: {
									get total() {
										return t._actions.length
									},
									get inUse() {
										return t._nActiveActions
									}
								},
								bindings: {
									get total() {
										return t._bindings.length
									},
									get inUse() {
										return t._nActiveBindings
									}
								},
								controlInterpolants: {
									get total() {
										return t._controlInterpolants.length
									},
									get inUse() {
										return t._nActiveControlInterpolants
									}
								}
							}
						},
						_isActiveAction: function (t) {
							var e = t._cacheIndex;
							return null !== e && e < this._nActiveActions
						},
						_addInactiveAction: function (t, e, i) {
							var n = this._actions,
								r = this._actionsByClip,
								a = r[e];
							if (void 0 === a) a = {
								knownActions: [t],
								actionByRoot: {}
							}, t._byClipCacheIndex = 0, r[e] = a;
							else {
								var o = a.knownActions;
								t._byClipCacheIndex = o.length, o.push(t)
							}
							t._cacheIndex = n.length, n.push(t), a.actionByRoot[i] = t
						},
						_removeInactiveAction: function (t) {
							var e = this._actions,
								i = e[e.length - 1],
								n = t._cacheIndex;
							i._cacheIndex = n, e[n] = i, e.pop(), t._cacheIndex = null;
							var r = t._clip.uuid,
								a = this._actionsByClip,
								o = a[r],
								s = o.knownActions,
								h = s[s.length - 1],
								l = t._byClipCacheIndex;
							h._byClipCacheIndex = l, s[l] = h, s.pop(), t._byClipCacheIndex = null;
							delete o.actionByRoot[(t._localRoot || this._root).uuid], 0 === s.length && delete a[r], this._removeInactiveBindingsForAction(t)
						},
						_removeInactiveBindingsForAction: function (t) {
							for (var e = t._propertyBindings, i = 0, n = e.length; i !== n; ++i) {
								var r = e[i];
								0 == --r.referenceCount && this._removeInactiveBinding(r)
							}
						},
						_lendAction: function (t) {
							var e = this._actions,
								i = t._cacheIndex,
								n = this._nActiveActions++,
								r = e[n];
							t._cacheIndex = n, e[n] = t, r._cacheIndex = i, e[i] = r
						},
						_takeBackAction: function (t) {
							var e = this._actions,
								i = t._cacheIndex,
								n = --this._nActiveActions,
								r = e[n];
							t._cacheIndex = n, e[n] = t, r._cacheIndex = i, e[i] = r
						},
						_addInactiveBinding: function (t, e, i) {
							var n = this._bindingsByRootAndName,
								r = n[e],
								a = this._bindings;
							void 0 === r && (r = {}, n[e] = r), r[i] = t, t._cacheIndex = a.length, a.push(t)
						},
						_removeInactiveBinding: function (t) {
							var e = this._bindings,
								i = t.binding,
								n = i.rootNode.uuid,
								r = i.path,
								a = this._bindingsByRootAndName,
								o = a[n],
								s = e[e.length - 1],
								h = t._cacheIndex;
							s._cacheIndex = h, e[h] = s, e.pop(), delete o[r];
							t: {
								for (var l in o) break t;delete a[n]
							}
						},
						_lendBinding: function (t) {
							var e = this._bindings,
								i = t._cacheIndex,
								n = this._nActiveBindings++,
								r = e[n];
							t._cacheIndex = n, e[n] = t, r._cacheIndex = i, e[i] = r
						},
						_takeBackBinding: function (t) {
							var e = this._bindings,
								i = t._cacheIndex,
								n = --this._nActiveBindings,
								r = e[n];
							t._cacheIndex = n, e[n] = t, r._cacheIndex = i, e[i] = r
						},
						_lendControlInterpolant: function () {
							var t = this._controlInterpolants,
								e = this._nActiveControlInterpolants++,
								i = t[e];
							return void 0 === i && ((i = new vi(new Float32Array(2), new Float32Array(2), 1, this._controlInterpolantsResultBuffer)).__cacheIndex = e, t[e] = i), i
						},
						_takeBackControlInterpolant: function (t) {
							var e = this._controlInterpolants,
								i = t.__cacheIndex,
								n = --this._nActiveControlInterpolants,
								r = e[n];
							t.__cacheIndex = n, e[n] = t, r.__cacheIndex = i, e[i] = r
						},
						_controlInterpolantsResultBuffer: new Float32Array(1),
						clipAction: function (t, e) {
							var i = e || this._root,
								n = i.uuid,
								r = "string" == typeof t ? Pi.findByName(i, t) : t,
								a = null !== r ? r.uuid : t,
								o = this._actionsByClip[a],
								s = null;
							if (void 0 !== o) {
								var h = o.actionByRoot[n];
								if (void 0 !== h) return h;
								s = o.knownActions[0], null === r && (r = s._clip)
							}
							if (null === r) return null;
							var l = new on(this, r, e);
							return this._bindAction(l, s), this._addInactiveAction(l, a, n), l
						},
						existingAction: function (t, e) {
							var i = e || this._root,
								n = i.uuid,
								r = "string" == typeof t ? Pi.findByName(i, t) : t,
								a = r ? r.uuid : t,
								o = this._actionsByClip[a];
							return void 0 !== o ? o.actionByRoot[n] || null : null
						},
						stopAllAction: function () {
							var t = this._actions,
								e = this._nActiveActions,
								i = this._bindings,
								n = this._nActiveBindings;
							this._nActiveActions = 0, this._nActiveBindings = 0;
							for (r = 0; r !== e; ++r) t[r].reset();
							for (var r = 0; r !== n; ++r) i[r].useCount = 0;
							return this
						},
						update: function (t) {
							t *= this.timeScale;
							for (var e = this._actions, i = this._nActiveActions, n = this.time += t, r = Math.sign(t), a = this._accuIndex ^= 1, o = 0; o !== i; ++o) {
								e[o]._update(n, t, r, a)
							}
							for (var s = this._bindings, h = this._nActiveBindings, o = 0; o !== h; ++o) s[o].apply(a);
							return this
						},
						getRoot: function () {
							return this._root
						},
						uncacheClip: function (t) {
							var e = this._actions,
								i = t.uuid,
								n = this._actionsByClip,
								r = n[i];
							if (void 0 !== r) {
								for (var a = r.knownActions, o = 0, s = a.length; o !== s; ++o) {
									var h = a[o];
									this._deactivateAction(h);
									var l = h._cacheIndex,
										c = e[e.length - 1];
									h._cacheIndex = null, h._byClipCacheIndex = null, c._cacheIndex = l, e[l] = c, e.pop(), this._removeInactiveBindingsForAction(h)
								}
								delete n[i]
							}
						},
						uncacheRoot: function (t) {
							var e = t.uuid,
								i = this._actionsByClip;
							for (var n in i) {
								var r = i[n].actionByRoot[e];
								void 0 !== r && (this._deactivateAction(r), this._removeInactiveAction(r))
							}
							var a = this._bindingsByRootAndName[e];
							if (void 0 !== a)
								for (var o in a) {
									var s = a[o];
									s.restoreOriginalState(), this._removeInactiveBinding(s)
								}
						},
						uncacheAction: function (t, e) {
							var i = this.existingAction(t, e);
							null !== i && (this._deactivateAction(i), this._removeInactiveAction(i))
						}
					}), hn.prototype.clone = function () {
						return new hn(void 0 === this.value.clone ? this.value : this.value.clone())
					}, ln.prototype = Object.assign(Object.create(St.prototype), {
						constructor: ln,
						isInstancedBufferGeometry: !0,
						copy: function (t) {
							return St.prototype.copy.call(this, t), this.maxInstancedCount = t.maxInstancedCount, this
						},
						clone: function () {
							return (new this.constructor).copy(this)
						}
					}), Object.defineProperties(cn.prototype, {
						count: {
							get: function () {
								return this.data.count
							}
						},
						array: {
							get: function () {
								return this.data.array
							}
						}
					}), Object.assign(cn.prototype, {
						isInterleavedBufferAttribute: !0,
						setX: function (t, e) {
							return this.data.array[t * this.data.stride + this.offset] = e, this
						},
						setY: function (t, e) {
							return this.data.array[t * this.data.stride + this.offset + 1] = e, this
						},
						setZ: function (t, e) {
							return this.data.array[t * this.data.stride + this.offset + 2] = e, this
						},
						setW: function (t, e) {
							return this.data.array[t * this.data.stride + this.offset + 3] = e, this
						},
						getX: function (t) {
							return this.data.array[t * this.data.stride + this.offset]
						},
						getY: function (t) {
							return this.data.array[t * this.data.stride + this.offset + 1]
						},
						getZ: function (t) {
							return this.data.array[t * this.data.stride + this.offset + 2]
						},
						getW: function (t) {
							return this.data.array[t * this.data.stride + this.offset + 3]
						},
						setXY: function (t, e, i) {
							return t = t * this.data.stride + this.offset, this.data.array[t + 0] = e, this.data.array[t + 1] = i, this
						},
						setXYZ: function (t, e, i, n) {
							return t = t * this.data.stride + this.offset, this.data.array[t + 0] = e, this.data.array[t + 1] = i, this.data.array[t + 2] = n, this
						},
						setXYZW: function (t, e, i, n, r) {
							return t = t * this.data.stride + this.offset, this.data.array[t + 0] = e, this.data.array[t + 1] = i, this.data.array[t + 2] = n, this.data.array[t + 3] = r, this
						}
					}), Object.defineProperty(un.prototype, "needsUpdate", {
						set: function (t) {
							!0 === t && this.version++
						}
					}), Object.assign(un.prototype, {
						isInterleavedBuffer: !0,
						setArray: function (t) {
							if (Array.isArray(t)) throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
							this.count = void 0 !== t ? t.length / this.stride : 0, this.array = t
						},
						setDynamic: function (t) {
							return this.dynamic = t, this
						},
						copy: function (t) {
							return this.array = new t.array.constructor(t.array), this.count = t.count, this.stride = t.stride, this.dynamic = t.dynamic, this
						},
						copyAt: function (t, e, i) {
							t *= this.stride, i *= e.stride;
							for (var n = 0, r = this.stride; n < r; n++) this.array[t + n] = e.array[i + n];
							return this
						},
						set: function (t, e) {
							return void 0 === e && (e = 0), this.array.set(t, e), this
						},
						clone: function () {
							return (new this.constructor).copy(this)
						},
						onUpload: function (t) {
							return this.onUploadCallback = t, this
						}
					}), dn.prototype = Object.assign(Object.create(un.prototype), {
						constructor: dn,
						isInstancedInterleavedBuffer: !0,
						copy: function (t) {
							return un.prototype.copy.call(this, t), this.meshPerAttribute = t.meshPerAttribute, this
						}
					}), fn.prototype = Object.assign(Object.create(ft.prototype), {
						constructor: fn,
						isInstancedBufferAttribute: !0,
						copy: function (t) {
							return ft.prototype.copy.call(this, t), this.meshPerAttribute = t.meshPerAttribute, this
						}
					}), Object.assign(pn.prototype, {
						linePrecision: 1,
						set: function (t, e) {
							this.ray.set(t, e)
						},
						setFromCamera: function (t, e) {
							e && e.isPerspectiveCamera ? (this.ray.origin.setFromMatrixPosition(e.matrixWorld), this.ray.direction.set(t.x, t.y, .5).unproject(e).sub(this.ray.origin).normalize()) : e && e.isOrthographicCamera ? (this.ray.origin.set(t.x, t.y, (e.near + e.far) / (e.near - e.far)).unproject(e), this.ray.direction.set(0, 0, -1).transformDirection(e.matrixWorld)) : console.error("THREE.Raycaster: Unsupported camera type.")
						},
						intersectObject: function (t, e) {
							var i = [];
							return gn(t, this, i, e), i.sort(mn), i
						},
						intersectObjects: function (t, e) {
							var i = [];
							if (!1 === Array.isArray(t)) return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."), i;
							for (var n = 0, r = t.length; n < r; n++) gn(t[n], this, i, e);
							return i.sort(mn), i
						}
					}), Object.assign(vn.prototype, {
						start: function () {
							this.startTime = ("undefined" == typeof performance ? Date : performance).now(), this.oldTime = this.startTime, this.elapsedTime = 0, this.running = !0
						},
						stop: function () {
							this.getElapsedTime(), this.running = !1, this.autoStart = !1
						},
						getElapsedTime: function () {
							return this.getDelta(), this.elapsedTime
						},
						getDelta: function () {
							var t = 0;
							if (this.autoStart && !this.running) return this.start(), 0;
							if (this.running) {
								var e = ("undefined" == typeof performance ? Date : performance).now();
								t = (e - this.oldTime) / 1e3, this.oldTime = e, this.elapsedTime += t
							}
							return t
						}
					}), Object.assign(yn.prototype, {
						set: function (t, e, i) {
							return this.radius = t, this.phi = e, this.theta = i, this
						},
						clone: function () {
							return (new this.constructor).copy(this)
						},
						copy: function (t) {
							return this.radius = t.radius, this.phi = t.phi, this.theta = t.theta, this
						},
						makeSafe: function () {
							return this.phi = Math.max(1e-6, Math.min(Math.PI - 1e-6, this.phi)), this
						},
						setFromVector3: function (t) {
							return this.radius = t.length(), 0 === this.radius ? (this.theta = 0, this.phi = 0) : (this.theta = Math.atan2(t.x, t.z), this.phi = Math.acos(Ya.clamp(t.y / this.radius, -1, 1))), this
						}
					}), Object.assign(bn.prototype, {
						set: function (t, e, i) {
							return this.radius = t, this.theta = e, this.y = i, this
						},
						clone: function () {
							return (new this.constructor).copy(this)
						},
						copy: function (t) {
							return this.radius = t.radius, this.theta = t.theta, this.y = t.y, this
						},
						setFromVector3: function (t) {
							return this.radius = Math.sqrt(t.x * t.x + t.z * t.z), this.theta = Math.atan2(t.x, t.z), this.y = t.y, this
						}
					}), (xn.prototype = Object.create(ht.prototype)).constructor = xn, xn.prototype.isImmediateRenderObject = !0, (_n.prototype = Object.create(me.prototype)).constructor = _n, _n.prototype.update = function () {
						var t = new a,
							e = new a,
							i = new s;
						return function () {
							var n = ["a", "b", "c"];
							this.object.updateMatrixWorld(!0), i.getNormalMatrix(this.object.matrixWorld);
							var r = this.object.matrixWorld,
								a = this.geometry.attributes.position,
								o = this.object.geometry;
							if (o && o.isGeometry)
								for (var s = o.vertices, h = o.faces, l = 0, c = 0, u = h.length; c < u; c++)
									for (var d = h[c], f = 0, p = d.vertexNormals.length; f < p; f++) {
										var m = s[d[n[f]]],
											g = d.vertexNormals[f];
										t.copy(m).applyMatrix4(r), e.copy(g).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t), a.setXYZ(l, t.x, t.y, t.z), l += 1, a.setXYZ(l, e.x, e.y, e.z), l += 1
									} else if (o && o.isBufferGeometry)
										for (var v = o.attributes.position, y = o.attributes.normal, l = 0, f = 0, p = v.count; f < p; f++) t.set(v.getX(f), v.getY(f), v.getZ(f)).applyMatrix4(r), e.set(y.getX(f), y.getY(f), y.getZ(f)), e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t), a.setXYZ(l, t.x, t.y, t.z), l += 1, a.setXYZ(l, e.x, e.y, e.z), l += 1;
							a.needsUpdate = !0
						}
					}(), (wn.prototype = Object.create(ht.prototype)).constructor = wn, wn.prototype.dispose = function () {
						this.cone.geometry.dispose(), this.cone.material.dispose()
					}, wn.prototype.update = function () {
						var t = new a,
							e = new a;
						return function () {
							this.light.updateMatrixWorld();
							var i = this.light.distance ? this.light.distance : 1e3,
								n = i * Math.tan(this.light.angle);
							this.cone.scale.set(n, n, i), t.setFromMatrixPosition(this.light.matrixWorld), e.setFromMatrixPosition(this.light.target.matrixWorld), this.cone.lookAt(e.sub(t)), void 0 !== this.color ? this.cone.material.color.set(this.color) : this.cone.material.color.copy(this.light.color)
						}
					}(), (Tn.prototype = Object.create(me.prototype)).constructor = Tn, Tn.prototype.updateMatrixWorld = function () {
						var t = new a,
							e = new n,
							i = new n;
						return function (n) {
							var r = this.bones,
								a = this.geometry,
								o = a.getAttribute("position");
							i.getInverse(this.root.matrixWorld);
							for (var s = 0, h = 0; s < r.length; s++) {
								var l = r[s];
								l.parent && l.parent.isBone && (e.multiplyMatrices(i, l.matrixWorld), t.setFromMatrixPosition(e), o.setXYZ(h, t.x, t.y, t.z), e.multiplyMatrices(i, l.parent.matrixWorld), t.setFromMatrixPosition(e), o.setXYZ(h + 1, t.x, t.y, t.z), h += 2)
							}
							a.getAttribute("position").needsUpdate = !0, ht.prototype.updateMatrixWorld.call(this, n)
						}
					}(), (Sn.prototype = Object.create(Dt.prototype)).constructor = Sn, Sn.prototype.dispose = function () {
						this.geometry.dispose(), this.material.dispose()
					}, Sn.prototype.update = function () {
						void 0 !== this.color ? this.material.color.set(this.color) : this.material.color.copy(this.light.color)
					}, (En.prototype = Object.create(ht.prototype)).constructor = En, En.prototype.dispose = function () {
						this.children[0].geometry.dispose(), this.children[0].material.dispose()
					}, En.prototype.update = function () {
						var t = .5 * this.light.width,
							e = .5 * this.light.height,
							i = this.line.geometry.attributes.position,
							n = i.array;
						n[0] = t, n[1] = -e, n[2] = 0, n[3] = t, n[4] = e, n[5] = 0, n[6] = -t, n[7] = e, n[8] = 0, n[9] = -t, n[10] = -e, n[11] = 0, n[12] = t, n[13] = -e, n[14] = 0, i.needsUpdate = !0, void 0 !== this.color ? this.line.material.color.set(this.color) : this.line.material.color.copy(this.light.color)
					}, (Cn.prototype = Object.create(ht.prototype)).constructor = Cn, Cn.prototype.dispose = function () {
						this.children[0].geometry.dispose(), this.children[0].material.dispose()
					}, Cn.prototype.update = function () {
						var t = new a,
							e = new q,
							i = new q;
						return function () {
							var n = this.children[0];
							if (void 0 !== this.color) this.material.color.set(this.color);
							else {
								var r = n.geometry.getAttribute("color");
								e.copy(this.light.color), i.copy(this.light.groundColor);
								for (var a = 0, o = r.count; a < o; a++) {
									var s = a < o / 2 ? e : i;
									r.setXYZ(a, s.r, s.g, s.b)
								}
								r.needsUpdate = !0
							}
							n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())
						}
					}(), (Pn.prototype = Object.create(me.prototype)).constructor = Pn, (kn.prototype = Object.create(me.prototype)).constructor = kn, (An.prototype = Object.create(me.prototype)).constructor = An, An.prototype.update = function () {
						var t = new a,
							e = new a,
							i = new s;
						return function () {
							this.object.updateMatrixWorld(!0), i.getNormalMatrix(this.object.matrixWorld);
							for (var n = this.object.matrixWorld, r = this.geometry.attributes.position, a = this.object.geometry, o = a.vertices, s = a.faces, h = 0, l = 0, c = s.length; l < c; l++) {
								var u = s[l],
									d = u.normal;
								t.copy(o[u.a]).add(o[u.b]).add(o[u.c]).divideScalar(3).applyMatrix4(n), e.copy(d).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t), r.setXYZ(h, t.x, t.y, t.z), h += 1, r.setXYZ(h, e.x, e.y, e.z), h += 1
							}
							r.needsUpdate = !0
						}
					}(), (Ln.prototype = Object.create(ht.prototype)).constructor = Ln, Ln.prototype.dispose = function () {
						this.lightPlane.geometry.dispose(), this.lightPlane.material.dispose(), this.targetLine.geometry.dispose(), this.targetLine.material.dispose()
					}, Ln.prototype.update = function () {
						var t = new a,
							e = new a,
							i = new a;
						return function () {
							t.setFromMatrixPosition(this.light.matrixWorld), e.setFromMatrixPosition(this.light.target.matrixWorld), i.subVectors(e, t), this.lightPlane.lookAt(i), void 0 !== this.color ? (this.lightPlane.material.color.set(this.color), this.targetLine.material.color.set(this.color)) : (this.lightPlane.material.color.copy(this.light.color), this.targetLine.material.color.copy(this.light.color)), this.targetLine.lookAt(i), this.targetLine.scale.z = i.length()
						}
					}(), (Rn.prototype = Object.create(me.prototype)).constructor = Rn, Rn.prototype.update = function () {
						function t(t, a, o, s) {
							n.set(a, o, s).unproject(r);
							var h = i[t];
							if (void 0 !== h)
								for (var l = e.getAttribute("position"), c = 0, u = h.length; c < u; c++) l.setXYZ(h[c], n.x, n.y, n.z)
						}
						var e, i, n = new a,
							r = new lt;
						return function () {
							e = this.geometry, i = this.pointMap;
							r.projectionMatrix.copy(this.camera.projectionMatrix), t("c", 0, 0, -1), t("t", 0, 0, 1), t("n1", -1, -1, -1), t("n2", 1, -1, -1), t("n3", -1, 1, -1), t("n4", 1, 1, -1), t("f1", -1, -1, 1), t("f2", 1, -1, 1), t("f3", -1, 1, 1), t("f4", 1, 1, 1), t("u1", .7, 1.1, -1), t("u2", -.7, 1.1, -1), t("u3", 0, 2, -1), t("cf1", -1, 0, 1), t("cf2", 1, 0, 1), t("cf3", 0, -1, 1), t("cf4", 0, 1, 1), t("cn1", -1, 0, -1), t("cn2", 1, 0, -1), t("cn3", 0, -1, -1), t("cn4", 0, 1, -1), e.getAttribute("position").needsUpdate = !0
						}
					}(), (On.prototype = Object.create(me.prototype)).constructor = On, On.prototype.update = function () {
						var t = new tt;
						return function (e) {
							if (void 0 !== e && console.warn("THREE.BoxHelper: .update() has no longer arguments."), void 0 !== this.object && t.setFromObject(this.object), !t.isEmpty()) {
								var i = t.min,
									n = t.max,
									r = this.geometry.attributes.position,
									a = r.array;
								a[0] = n.x, a[1] = n.y, a[2] = n.z, a[3] = i.x, a[4] = n.y, a[5] = n.z, a[6] = i.x, a[7] = i.y, a[8] = n.z, a[9] = n.x, a[10] = i.y, a[11] = n.z, a[12] = n.x, a[13] = n.y, a[14] = i.z, a[15] = i.x, a[16] = n.y, a[17] = i.z, a[18] = i.x, a[19] = i.y, a[20] = i.z, a[21] = n.x, a[22] = i.y, a[23] = i.z, r.needsUpdate = !0, this.geometry.computeBoundingSphere()
							}
						}
					}(), On.prototype.setFromObject = function (t) {
						return this.object = t, this.update(), this
					}, (In.prototype = Object.create(me.prototype)).constructor = In, In.prototype.updateMatrixWorld = function (t) {
						var e = this.box;
						e.isEmpty() || (e.getCenter(this.position), e.getSize(this.scale), this.scale.multiplyScalar(.5), ht.prototype.updateMatrixWorld.call(this, t))
					}, (Bn.prototype = Object.create(pe.prototype)).constructor = Bn, Bn.prototype.updateMatrixWorld = function (t) {
						var e = -this.plane.constant;
						Math.abs(e) < 1e-8 && (e = 1e-8), this.scale.set(.5 * this.size, .5 * this.size, e), this.lookAt(this.plane.normal), ht.prototype.updateMatrixWorld.call(this, t)
					};
				var Ao, Lo;
				(Un.prototype = Object.create(ht.prototype)).constructor = Un, Un.prototype.setDirection = function () {
					var t, e = new a;
					return function (i) {
						i.y > .99999 ? this.quaternion.set(0, 0, 0, 1) : i.y < -.99999 ? this.quaternion.set(1, 0, 0, 0) : (e.set(i.z, 0, -i.x).normalize(), t = Math.acos(i.y), this.quaternion.setFromAxisAngle(e, t))
					}
				}(), Un.prototype.setLength = function (t, e, i) {
					void 0 === e && (e = .2 * t), void 0 === i && (i = .2 * e), this.line.scale.set(1, Math.max(0, t - e), 1), this.line.updateMatrix(), this.cone.scale.set(i, e, i), this.cone.position.y = t, this.cone.updateMatrix()
				}, Un.prototype.setColor = function (t) {
					this.line.material.color.copy(t), this.cone.material.color.copy(t)
				}, (Dn.prototype = Object.create(me.prototype)).constructor = Dn;
				var Ro = new a,
					Oo = new zn,
					Io = new zn,
					Bo = new zn;
				(jn.prototype = Object.create(Di.prototype)).constructor = jn, jn.prototype.isCatmullRomCurve3 = !0, jn.prototype.getPoint = function (t, e) {
					var i = e || new a,
						n = this.points,
						r = n.length,
						o = (r - (this.closed ? 0 : 1)) * t,
						s = Math.floor(o),
						h = o - s;
					this.closed ? s += s > 0 ? 0 : (Math.floor(Math.abs(s) / n.length) + 1) * n.length : 0 === h && s === r - 1 && (s = r - 2, h = 1);
					var l, c, u, d;
					if (this.closed || s > 0 ? l = n[(s - 1) % r] : (Ro.subVectors(n[0], n[1]).add(n[0]), l = Ro), c = n[s % r], u = n[(s + 1) % r], this.closed || s + 2 < r ? d = n[(s + 2) % r] : (Ro.subVectors(n[r - 1], n[r - 2]).add(n[r - 1]), d = Ro), void 0 === this.type || "centripetal" === this.type || "chordal" === this.type) {
						var f = "chordal" === this.type ? .5 : .25,
							p = Math.pow(l.distanceToSquared(c), f),
							m = Math.pow(c.distanceToSquared(u), f),
							g = Math.pow(u.distanceToSquared(d), f);
						m < 1e-4 && (m = 1), p < 1e-4 && (p = m), g < 1e-4 && (g = m), Oo.initNonuniformCatmullRom(l.x, c.x, u.x, d.x, p, m, g), Io.initNonuniformCatmullRom(l.y, c.y, u.y, d.y, p, m, g), Bo.initNonuniformCatmullRom(l.z, c.z, u.z, d.z, p, m, g)
					} else if ("catmullrom" === this.type) {
						var v = void 0 !== this.tension ? this.tension : .5;
						Oo.initCatmullRom(l.x, c.x, u.x, d.x, v), Io.initCatmullRom(l.y, c.y, u.y, d.y, v), Bo.initCatmullRom(l.z, c.z, u.z, d.z, v)
					}
					return i.set(Oo.calc(h), Io.calc(h), Bo.calc(h)), i
				}, (Nn.prototype = Object.create(Di.prototype)).constructor = Nn, Nn.prototype.isCubicBezierCurve3 = !0, Nn.prototype.getPoint = function (t, e) {
					var i = e || new a,
						n = this.v0,
						r = this.v1,
						o = this.v2,
						s = this.v3;
					return i.set(Ui(t, n.x, r.x, o.x, s.x), Ui(t, n.y, r.y, o.y, s.y), Ui(t, n.z, r.z, o.z, s.z)), i
				}, (Fn.prototype = Object.create(Di.prototype)).constructor = Fn, Fn.prototype.isQuadraticBezierCurve3 = !0, Fn.prototype.getPoint = function (t, e) {
					var i = e || new a,
						n = this.v0,
						r = this.v1,
						o = this.v2;
					return i.set(Bi(t, n.x, r.x, o.x), Bi(t, n.y, r.y, o.y), Bi(t, n.z, r.z, o.z)), i
				}, (Gn.prototype = Object.create(Di.prototype)).constructor = Gn, Gn.prototype.isLineCurve3 = !0, Gn.prototype.getPoint = function (t, e) {
					var i = e || new a;
					return 1 === t ? i.copy(this.v2) : (i.copy(this.v2).sub(this.v1), i.multiplyScalar(t).add(this.v1)), i
				}, Gn.prototype.getPointAt = function (t, e) {
					return this.getPoint(t, e)
				}, (Hn.prototype = Object.create(Ni.prototype)).constructor = Hn, Hn.prototype.isArcCurve = !0;
				var Uo = {
					createMultiMaterialObject: function (t, e) {
						for (var i = new be, n = 0, r = e.length; n < r; n++) i.add(new Dt(t, e[n]));
						return i
					},
					detach: function (t, e, i) {
						t.applyMatrix(e.matrixWorld), e.remove(t), i.add(t)
					},
					attach: function (t, e, i) {
						t.applyMatrix((new n).getInverse(i.matrixWorld)), e.remove(t), i.add(t)
					}
				};
				Di.create = function (t, e) {
					return console.log("THREE.Curve.create() has been deprecated"), t.prototype = Object.create(Di.prototype), t.prototype.constructor = t, t.prototype.getPoint = e, t
				}, Object.assign(ji.prototype, {
					createPointsGeometry: function (t) {
						console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
						var e = this.getPoints(t);
						return this.createGeometry(e)
					},
					createSpacedPointsGeometry: function (t) {
						console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
						var e = this.getSpacedPoints(t);
						return this.createGeometry(e)
					},
					createGeometry: function (t) {
						console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");
						for (var e = new dt, i = 0, n = t.length; i < n; i++) {
							var r = t[i];
							e.vertices.push(new a(r.x, r.y, r.z || 0))
						}
						return e
					}
				}), Vn.prototype = Object.create(jn.prototype), Wn.prototype = Object.create(jn.prototype), qn.prototype = Object.create(jn.prototype), Object.assign(qn.prototype, {
					initFromArray: function () {
						console.error("THREE.Spline: .initFromArray() has been removed.")
					},
					getControlPointsArray: function () {
						console.error("THREE.Spline: .getControlPointsArray() has been removed.")
					},
					reparametrizeByArcLength: function () {
						console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")
					}
				}), Pn.prototype.setColors = function () {
					console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")
				}, Tn.prototype.update = function () {
					console.error("THREE.SkeletonHelper: update() no longer needs to be called.")
				}, Object.assign(X.prototype, {
					center: function (t) {
						return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."), this.getCenter(t)
					},
					empty: function () {
						return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."), this.isEmpty()
					},
					isIntersectionBox: function (t) {
						return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t)
					},
					size: function (t) {
						return console.warn("THREE.Box2: .size() has been renamed to .getSize()."), this.getSize(t)
					}
				}), Object.assign(tt.prototype, {
					center: function (t) {
						return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."), this.getCenter(t)
					},
					empty: function () {
						return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."), this.isEmpty()
					},
					isIntersectionBox: function (t) {
						return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t)
					},
					isIntersectionSphere: function (t) {
						return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(t)
					},
					size: function (t) {
						return console.warn("THREE.Box3: .size() has been renamed to .getSize()."), this.getSize(t)
					}
				}), Bt.prototype.center = function (t) {
					return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."), this.getCenter(t)
				}, Object.assign(Ya, {
					random16: function () {
						return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."), Math.random()
					},
					nearestPowerOfTwo: function (t) {
						return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."), Ya.floorPowerOfTwo(t)
					},
					nextPowerOfTwo: function (t) {
						return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."), Ya.ceilPowerOfTwo(t)
					}
				}), Object.assign(s.prototype, {
					flattenToArrayOffset: function (t, e) {
						return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(t, e)
					},
					multiplyVector3: function (t) {
						return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."), t.applyMatrix3(this)
					},
					multiplyVector3Array: function () {
						console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")
					},
					applyToBuffer: function (t) {
						return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."), this.applyToBufferAttribute(t)
					},
					applyToVector3Array: function () {
						console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")
					}
				}), Object.assign(n.prototype, {
					extractPosition: function (t) {
						return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."), this.copyPosition(t)
					},
					flattenToArrayOffset: function (t, e) {
						return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(t, e)
					},
					getPosition: function () {
						var t;
						return function () {
							return void 0 === t && (t = new a), console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."), t.setFromMatrixColumn(this, 3)
						}
					}(),
					setRotationFromQuaternion: function (t) {
						return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."), this.makeRotationFromQuaternion(t)
					},
					multiplyToArray: function () {
						console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")
					},
					multiplyVector3: function (t) {
						return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this)
					},
					multiplyVector4: function (t) {
						return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this)
					},
					multiplyVector3Array: function () {
						console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")
					},
					rotateAxis: function (t) {
						console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."), t.transformDirection(this)
					},
					crossVector: function (t) {
						return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this)
					},
					translate: function () {
						console.error("THREE.Matrix4: .translate() has been removed.")
					},
					rotateX: function () {
						console.error("THREE.Matrix4: .rotateX() has been removed.")
					},
					rotateY: function () {
						console.error("THREE.Matrix4: .rotateY() has been removed.")
					},
					rotateZ: function () {
						console.error("THREE.Matrix4: .rotateZ() has been removed.")
					},
					rotateByAxis: function () {
						console.error("THREE.Matrix4: .rotateByAxis() has been removed.")
					},
					applyToBuffer: function (t) {
						return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."), this.applyToBufferAttribute(t)
					},
					applyToVector3Array: function () {
						console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")
					},
					makeFrustum: function (t, e, i, n, r, a) {
						return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."), this.makePerspective(t, e, n, i, r, a)
					}
				}), it.prototype.isIntersectionLine = function (t) {
					return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."), this.intersectsLine(t)
				}, r.prototype.multiplyVector3 = function (t) {
					return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."), t.applyQuaternion(this)
				}, Object.assign(It.prototype, {
					isIntersectionBox: function (t) {
						return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t)
					},
					isIntersectionPlane: function (t) {
						return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."), this.intersectsPlane(t)
					},
					isIntersectionSphere: function (t) {
						return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(t)
					}
				}), Object.assign(Wi.prototype, {
					extrude: function (t) {
						return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."), new Oe(this, t)
					},
					makeGeometry: function (t) {
						return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."), new Et(this, t)
					}
				}), Object.assign(i.prototype, {
					fromAttribute: function (t, e, i) {
						return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, i)
					},
					distanceToManhattan: function (t) {
						return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."), this.manhattanDistanceTo(t)
					},
					lengthManhattan: function () {
						return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength()
					}
				}), Object.assign(a.prototype, {
					setEulerFromRotationMatrix: function () {
						console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")
					},
					setEulerFromQuaternion: function () {
						console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")
					},
					getPositionFromMatrix: function (t) {
						return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."), this.setFromMatrixPosition(t)
					},
					getScaleFromMatrix: function (t) {
						return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."), this.setFromMatrixScale(t)
					},
					getColumnFromMatrix: function (t, e) {
						return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."), this.setFromMatrixColumn(e, t)
					},
					applyProjection: function (t) {
						return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."), this.applyMatrix4(t)
					},
					fromAttribute: function (t, e, i) {
						return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, i)
					},
					distanceToManhattan: function (t) {
						return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."), this.manhattanDistanceTo(t)
					},
					lengthManhattan: function () {
						return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength()
					}
				}), Object.assign(l.prototype, {
					fromAttribute: function (t, e, i) {
						return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, i)
					},
					lengthManhattan: function () {
						return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength()
					}
				}), dt.prototype.computeTangents = function () {
					console.warn("THREE.Geometry: .computeTangents() has been removed.")
				}, Object.assign(ht.prototype, {
					getChildByName: function (t) {
						return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."), this.getObjectByName(t)
					},
					renderDepth: function () {
						console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")
					},
					translate: function (t, e) {
						return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."), this.translateOnAxis(e, t)
					}
				}), Object.defineProperties(ht.prototype, {
					eulerOrder: {
						get: function () {
							return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order
						},
						set: function (t) {
							console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order = t
						}
					},
					useQuaternion: {
						get: function () {
							console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")
						},
						set: function () {
							console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")
						}
					}
				}), Object.defineProperties(le.prototype, {
					objects: {
						get: function () {
							return console.warn("THREE.LOD: .objects has been renamed to .levels."), this.levels
						}
					}
				}), Object.defineProperty(ce.prototype, "useVertexTexture", {
					get: function () {
						console.warn("THREE.Skeleton: useVertexTexture has been removed.")
					},
					set: function () {
						console.warn("THREE.Skeleton: useVertexTexture has been removed.")
					}
				}), Object.defineProperty(Di.prototype, "__arcLengthDivisions", {
					get: function () {
						return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."), this.arcLengthDivisions
					},
					set: function (t) {
						console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."), this.arcLengthDivisions = t
					}
				}), $t.prototype.setLens = function (t, e) {
					console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."), void 0 !== e && (this.filmGauge = e), this.setFocalLength(t)
				}, Object.defineProperties(ai.prototype, {
					onlyShadow: {
						set: function () {
							console.warn("THREE.Light: .onlyShadow has been removed.")
						}
					},
					shadowCameraFov: {
						set: function (t) {
							console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."), this.shadow.camera.fov = t
						}
					},
					shadowCameraLeft: {
						set: function (t) {
							console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."), this.shadow.camera.left = t
						}
					},
					shadowCameraRight: {
						set: function (t) {
							console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."), this.shadow.camera.right = t
						}
					},
					shadowCameraTop: {
						set: function (t) {
							console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."), this.shadow.camera.top = t
						}
					},
					shadowCameraBottom: {
						set: function (t) {
							console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."), this.shadow.camera.bottom = t
						}
					},
					shadowCameraNear: {
						set: function (t) {
							console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."), this.shadow.camera.near = t
						}
					},
					shadowCameraFar: {
						set: function (t) {
							console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."), this.shadow.camera.far = t
						}
					},
					shadowCameraVisible: {
						set: function () {
							console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")
						}
					},
					shadowBias: {
						set: function (t) {
							console.warn("THREE.Light: .shadowBias is now .shadow.bias."), this.shadow.bias = t
						}
					},
					shadowDarkness: {
						set: function () {
							console.warn("THREE.Light: .shadowDarkness has been removed.")
						}
					},
					shadowMapWidth: {
						set: function (t) {
							console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."), this.shadow.mapSize.width = t
						}
					},
					shadowMapHeight: {
						set: function (t) {
							console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."), this.shadow.mapSize.height = t
						}
					}
				}), Object.defineProperties(ft.prototype, {
					length: {
						get: function () {
							return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."), this.array.length
						}
					}
				}), Object.assign(St.prototype, {
					addIndex: function (t) {
						console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."), this.setIndex(t)
					},
					addDrawCall: function (t, e, i) {
						void 0 !== i && console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."), console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."), this.addGroup(t, e)
					},
					clearDrawCalls: function () {
						console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."), this.clearGroups()
					},
					computeTangents: function () {
						console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")
					},
					computeOffsets: function () {
						console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")
					}
				}), Object.defineProperties(St.prototype, {
					drawcalls: {
						get: function () {
							return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."), this.groups
						}
					},
					offsets: {
						get: function () {
							return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."), this.groups
						}
					}
				}), Object.defineProperties(hn.prototype, {
					dynamic: {
						set: function () {
							console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")
						}
					},
					onUpdate: {
						value: function () {
							return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."), this
						}
					}
				}), Object.defineProperties(J.prototype, {
					wrapAround: {
						get: function () {
							console.warn("THREE.Material: .wrapAround has been removed.")
						},
						set: function () {
							console.warn("THREE.Material: .wrapAround has been removed.")
						}
					},
					wrapRGB: {
						get: function () {
							return console.warn("THREE.Material: .wrapRGB has been removed."), new q
						}
					},
					shading: {
						get: function () {
							console.error("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead.")
						},
						set: function (t) {
							console.warn("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."), this.flatShading = 1 === t
						}
					}
				}), Object.defineProperties(Ye.prototype, {
					metal: {
						get: function () {
							return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."), !1
						},
						set: function () {
							console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")
						}
					}
				}), Object.defineProperties(Ot.prototype, {
					derivatives: {
						get: function () {
							return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives
						},
						set: function (t) {
							console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives = t
						}
					}
				}), Object.assign(ie.prototype, {
					getCurrentRenderTarget: function () {
						return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."), this.getRenderTarget()
					},
					getMaxAnisotropy: function () {
						return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."), this.capabilities.getMaxAnisotropy()
					},
					getPrecision: function () {
						return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."), this.capabilities.precision
					},
					resetGLState: function () {
						return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."), this.state.reset()
					},
					supportsFloatTextures: function () {
						return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."), this.extensions.get("OES_texture_float")
					},
					supportsHalfFloatTextures: function () {
						return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."), this.extensions.get("OES_texture_half_float")
					},
					supportsStandardDerivatives: function () {
						return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."), this.extensions.get("OES_standard_derivatives")
					},
					supportsCompressedTextureS3TC: function () {
						return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."), this.extensions.get("WEBGL_compressed_texture_s3tc")
					},
					supportsCompressedTexturePVRTC: function () {
						return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."), this.extensions.get("WEBGL_compressed_texture_pvrtc")
					},
					supportsBlendMinMax: function () {
						return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."), this.extensions.get("EXT_blend_minmax")
					},
					supportsVertexTextures: function () {
						return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."), this.capabilities.vertexTextures
					},
					supportsInstancedArrays: function () {
						return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."), this.extensions.get("ANGLE_instanced_arrays")
					},
					enableScissorTest: function (t) {
						console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."), this.setScissorTest(t)
					},
					initMaterial: function () {
						console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")
					},
					addPrePlugin: function () {
						console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")
					},
					addPostPlugin: function () {
						console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")
					},
					updateShadowMap: function () {
						console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")
					}
				}), Object.defineProperties(ie.prototype, {
					shadowMapEnabled: {
						get: function () {
							return this.shadowMap.enabled
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."), this.shadowMap.enabled = t
						}
					},
					shadowMapType: {
						get: function () {
							return this.shadowMap.type
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."), this.shadowMap.type = t
						}
					},
					shadowMapCullFace: {
						get: function () {
							return this.shadowMap.cullFace
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace."), this.shadowMap.cullFace = t
						}
					}
				}), Object.defineProperties(rt.prototype, {
					cullFace: {
						get: function () {
							return this.renderReverseSided ? Zn : Yn
						},
						set: function (t) {
							var e = t !== Yn;
							console.warn("WebGLRenderer: .shadowMap.cullFace is deprecated. Set .shadowMap.renderReverseSided to " + e + "."), this.renderReverseSided = e
						}
					}
				}), Object.defineProperties(c.prototype, {
					wrapS: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS = t
						}
					},
					wrapT: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT = t
						}
					},
					magFilter: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter = t
						}
					},
					minFilter: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter = t
						}
					},
					anisotropy: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy = t
						}
					},
					offset: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset = t
						}
					},
					repeat: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat = t
						}
					},
					format: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format = t
						}
					},
					type: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type = t
						}
					},
					generateMipmaps: {
						get: function () {
							return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps
						},
						set: function (t) {
							console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps = t
						}
					}
				}), Qi.prototype.load = function (t) {
					console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");
					var e = this;
					return (new Yi).load(t, function (t) {
						e.setBuffer(t)
					}), this
				}, tn.prototype.getData = function () {
					return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."), this.getFrequencyData()
				};
				var Do = {
						merge: function (t, e, i) {
							console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");
							var n;
							e.isMesh && (e.matrixAutoUpdate && e.updateMatrix(), n = e.matrix, e = e.geometry), t.merge(e, n, i)
						},
						center: function (t) {
							return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."), t.center()
						}
					},
					zo = {
						crossOrigin: void 0,
						loadTexture: function (t, e, i, n) {
							console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");
							var r = new ri;
							r.setCrossOrigin(this.crossOrigin);
							var a = r.load(t, i, void 0, n);
							return e && (a.mapping = e), a
						},
						loadTextureCube: function (t, e, i, n) {
							console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");
							var r = new ni;
							r.setCrossOrigin(this.crossOrigin);
							var a = r.load(t, i, void 0, n);
							return e && (a.mapping = e), a
						},
						loadCompressedTexture: function () {
							console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")
						},
						loadCompressedTextureCube: function () {
							console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")
						}
					};
				t.WebGLRenderTargetCube = u, t.WebGLRenderTarget = c, t.WebGLRenderer = ie, t.ShaderLib = ho, t.UniformsLib = ao, t.UniformsUtils = oo, t.ShaderChunk = so, t.FogExp2 = ne, t.Fog = re, t.Scene = ae, t.LensFlare = oe, t.Sprite = he, t.LOD = le, t.SkinnedMesh = de, t.Skeleton = ce, t.Bone = ue, t.Mesh = Dt, t.LineSegments = me, t.LineLoop = ge, t.Line = pe, t.Points = ye, t.Group = be, t.VideoTexture = xe, t.DataTexture = d, t.CompressedTexture = _e, t.CubeTexture = f, t.CanvasTexture = Y, t.DepthTexture = we, t.Texture = h, t.CompressedTextureLoader = ti, t.DataTextureLoader = ei, t.CubeTextureLoader = ni, t.TextureLoader = ri, t.ObjectLoader = Oi, t.MaterialLoader = ki, t.BufferGeometryLoader = Ai, t.DefaultLoadingManager = bo, t.LoadingManager = Qe, t.JSONLoader = Ri, t.ImageLoader = ii, t.FontLoader = Ki, t.FileLoader = $e, t.Loader = Li, t.Cache = yo, t.AudioLoader = Yi, t.SpotLightShadow = hi, t.SpotLight = li, t.PointLight = ci, t.RectAreaLight = pi, t.HemisphereLight = oi, t.DirectionalLightShadow = ui, t.DirectionalLight = di, t.AmbientLight = fi, t.LightShadow = si, t.Light = ai, t.StereoCamera = Zi, t.PerspectiveCamera = $t, t.OrthographicCamera = ct, t.ArrayCamera = te, t.Camera = lt, t.AudioListener = Ji, t.PositionalAudio = $i, t.AudioContext = ko, t.AudioAnalyser = tn, t.Audio = Qi, t.VectorKeyframeTrack = xi, t.StringKeyframeTrack = Ti, t.QuaternionKeyframeTrack = wi, t.NumberKeyframeTrack = Mi, t.ColorKeyframeTrack = Ei, t.BooleanKeyframeTrack = Si, t.PropertyMixer = en, t.PropertyBinding = rn, t.KeyframeTrack = Ci, t.AnimationUtils = _o, t.AnimationObjectGroup = an, t.AnimationMixer = sn, t.AnimationClip = Pi, t.Uniform = hn, t.InstancedBufferGeometry = ln, t.BufferGeometry = St, t.Geometry = dt, t.InterleavedBufferAttribute = cn, t.InstancedInterleavedBuffer = dn, t.InterleavedBuffer = un, t.InstancedBufferAttribute = fn, t.Face3 = ut, t.Object3D = ht, t.Raycaster = pn, t.Layers = st, t.EventDispatcher = e, t.Clock = vn, t.QuaternionLinearInterpolant = _i, t.LinearInterpolant = vi, t.DiscreteInterpolant = yi, t.CubicInterpolant = gi, t.Interpolant = mi, t.Triangle = Ut, t.Math = Ya, t.Spherical = yn, t.Cylindrical = bn, t.Plane = it, t.Frustum = nt, t.Sphere = et, t.Ray = It, t.Matrix4 = n, t.Matrix3 = s, t.Box3 = tt, t.Box2 = X, t.Line3 = Bt, t.Euler = ot, t.Vector4 = l, t.Vector3 = a, t.Vector2 = i, t.Quaternion = r, t.Color = q, t.ImmediateRenderObject = xn, t.VertexNormalsHelper = _n, t.SpotLightHelper = wn, t.SkeletonHelper = Tn, t.PointLightHelper = Sn, t.RectAreaLightHelper = En, t.HemisphereLightHelper = Cn, t.GridHelper = Pn, t.PolarGridHelper = kn, t.FaceNormalsHelper = An, t.DirectionalLightHelper = Ln, t.CameraHelper = Rn, t.BoxHelper = On, t.Box3Helper = In, t.PlaneHelper = Bn, t.ArrowHelper = Un, t.AxesHelper = Dn, t.CatmullRomCurve3 = jn, t.CubicBezierCurve3 = Nn, t.QuadraticBezierCurve3 = Fn, t.LineCurve3 = Gn, t.ArcCurve = Hn, t.EllipseCurve = Ni, t.SplineCurve = Fi, t.CubicBezierCurve = Gi, t.QuadraticBezierCurve = Hi, t.LineCurve = zi, t.Shape = Wi, t.Path = Vi, t.ShapePath = qi, t.Font = Xi, t.CurvePath = ji, t.Curve = Di, t.ShapeUtils = mo, t.SceneUtils = Uo, t.WebGLUtils = ee, t.ParametricGeometry = Me, t.ParametricBufferGeometry = Te, t.TetrahedronGeometry = Ce, t.TetrahedronBufferGeometry = Pe, t.OctahedronGeometry = ke, t.OctahedronBufferGeometry = Ae, t.IcosahedronGeometry = Le, t.IcosahedronBufferGeometry = Re, t.PolyhedronGeometry = Se, t.PolyhedronBufferGeometry = Ee, t.TextGeometry = Be, t.TextBufferGeometry = Ue, t.SphereGeometry = De, t.SphereBufferGeometry = ze, t.RingGeometry = je, t.RingBufferGeometry = Ne, t.PlaneGeometry = At, t.PlaneBufferGeometry = Lt, t.ExtrudeGeometry = Oe, t.ExtrudeBufferGeometry = Ie, t.ShapeGeometry = Et, t.ShapeBufferGeometry = Ct, t.ConeGeometry = He, t.ConeBufferGeometry = Ve, t.CylinderGeometry = Fe, t.CylinderBufferGeometry = Ge, t.CircleGeometry = We, t.CircleBufferGeometry = qe, t.BoxGeometry = Pt, t.BoxBufferGeometry = kt, t.ShadowMaterial = Xe, t.SpriteMaterial = se, t.MeshPhongMaterial = Ye, t.MeshLambertMaterial = Ze, t.MeshBasicMaterial = Rt, t.Material = J, t.Float64BufferAttribute = wt, t.Float32BufferAttribute = _t, t.Uint32BufferAttribute = xt, t.Int32BufferAttribute = bt, t.Uint16BufferAttribute = yt, t.Int16BufferAttribute = vt, t.Uint8ClampedBufferAttribute = gt, t.Uint8BufferAttribute = mt, t.Int8BufferAttribute = pt, t.BufferAttribute = ft, t.REVISION = Xn, t.MOUSE = {
					LEFT: 0,
					MIDDLE: 1,
					RIGHT: 2
				}, t.CullFaceNone = Kn, t.CullFaceBack = Yn, t.CullFaceFront = Zn, t.CullFaceFrontBack = 3, t.FrontFaceDirectionCW = Jn, t.FrontFaceDirectionCCW = 1, t.BasicShadowMap = 0, t.PCFShadowMap = Qn, t.PCFSoftShadowMap = $n, t.FrontSide = tr, t.BackSide = er, t.DoubleSide = ir, t.FlatShading = 1, t.SmoothShading = 2, t.NoColors = nr, t.FaceColors = rr, t.VertexColors = ar, t.NoBlending = or, t.NormalBlending = sr, t.AdditiveBlending = hr, t.SubtractiveBlending = lr, t.MultiplyBlending = cr, t.CustomBlending = ur, t.AddEquation = dr, t.SubtractEquation = fr, t.ReverseSubtractEquation = pr, t.MinEquation = mr, t.MaxEquation = gr, t.ZeroFactor = vr, t.OneFactor = yr, t.SrcColorFactor = br, t.OneMinusSrcColorFactor = xr, t.SrcAlphaFactor = _r, t.OneMinusSrcAlphaFactor = wr, t.DstAlphaFactor = Mr, t.OneMinusDstAlphaFactor = Tr, t.DstColorFactor = Sr, t.OneMinusDstColorFactor = Er, t.SrcAlphaSaturateFactor = Cr, t.NeverDepth = Pr, t.AlwaysDepth = kr, t.LessDepth = Ar, t.LessEqualDepth = Lr, t.EqualDepth = Rr, t.GreaterEqualDepth = Or, t.GreaterDepth = Ir, t.NotEqualDepth = Br, t.MultiplyOperation = Ur, t.MixOperation = Dr, t.AddOperation = zr, t.NoToneMapping = jr, t.LinearToneMapping = Nr, t.ReinhardToneMapping = Fr, t.Uncharted2ToneMapping = Gr, t.CineonToneMapping = Hr, t.UVMapping = 300, t.CubeReflectionMapping = Vr, t.CubeRefractionMapping = Wr, t.EquirectangularReflectionMapping = qr, t.EquirectangularRefractionMapping = Xr, t.SphericalReflectionMapping = Kr, t.CubeUVReflectionMapping = Yr, t.CubeUVRefractionMapping = Zr, t.RepeatWrapping = Jr, t.ClampToEdgeWrapping = Qr, t.MirroredRepeatWrapping = $r, t.NearestFilter = ta, t.NearestMipMapNearestFilter = ea, t.NearestMipMapLinearFilter = ia, t.LinearFilter = na, t.LinearMipMapNearestFilter = ra, t.LinearMipMapLinearFilter = aa, t.UnsignedByteType = oa, t.ByteType = sa, t.ShortType = ha, t.UnsignedShortType = la, t.IntType = ca, t.UnsignedIntType = ua, t.FloatType = da, t.HalfFloatType = fa, t.UnsignedShort4444Type = pa, t.UnsignedShort5551Type = ma, t.UnsignedShort565Type = ga, t.UnsignedInt248Type = va, t.AlphaFormat = ya, t.RGBFormat = ba, t.RGBAFormat = xa, t.LuminanceFormat = _a, t.LuminanceAlphaFormat = wa, t.RGBEFormat = Ma, t.DepthFormat = Ta, t.DepthStencilFormat = Sa, t.RGB_S3TC_DXT1_Format = Ea, t.RGBA_S3TC_DXT1_Format = Ca, t.RGBA_S3TC_DXT3_Format = Pa, t.RGBA_S3TC_DXT5_Format = ka, t.RGB_PVRTC_4BPPV1_Format = Aa, t.RGB_PVRTC_2BPPV1_Format = La, t.RGBA_PVRTC_4BPPV1_Format = Ra, t.RGBA_PVRTC_2BPPV1_Format = Oa, t.RGB_ETC1_Format = Ia, t.LoopOnce = 2200, t.LoopRepeat = Ba, t.LoopPingPong = 2202, t.InterpolateDiscrete = 2300, t.InterpolateLinear = 2301, t.InterpolateSmooth = 2302, t.ZeroCurvatureEnding = Ua, t.ZeroSlopeEnding = 2401, t.WrapAroundEnding = 2402, t.TrianglesDrawMode = Da, t.TriangleStripDrawMode = za, t.TriangleFanDrawMode = ja, t.LinearEncoding = Na, t.sRGBEncoding = Fa, t.GammaEncoding = Ga, t.RGBEEncoding = Ha, t.LogLuvEncoding = 3003, t.RGBM7Encoding = Va, t.RGBM16Encoding = Wa, t.RGBDEncoding = qa, t.BasicDepthPacking = Xa, t.RGBADepthPacking = Ka, t.CubeGeometry = Pt, t.Face4 = function (t, e, i, n, r, a, o) {
					return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."), new ut(t, e, i, r, a, o)
				}, t.LineStrip = 0, t.LinePieces = 1, t.MeshFaceMaterial = function (t) {
					return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."), t
				}, t.MultiMaterial = function (t) {
					return void 0 === t && (t = []), console.warn("THREE.MultiMaterial has been removed. Use an Array instead."), t.isMultiMaterial = !0, t.materials = t, t.clone = function () {
						return t.slice()
					}, t
				}, t.PointCloud = function (t, e) {
					return console.warn("THREE.PointCloud has been renamed to THREE.Points."), new ye(t, e)
				}, t.Particle = function (t) {
					return console.warn("THREE.Particle has been renamed to THREE.Sprite."), new he(t)
				}, t.ParticleSystem = function (t, e) {
					return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."), new ye(t, e)
				}, t.PointCloudMaterial = function (t) {
					return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."), new ve(t)
				}, t.ParticleBasicMaterial = function (t) {
					return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."), new ve(t)
				}, t.ParticleSystemMaterial = function (t) {
					return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."), new ve(t)
				}, t.Vertex = function (t, e, i) {
					return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."), new a(t, e, i)
				}, t.DynamicBufferAttribute = function (t, e) {
					return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."), new ft(t, e).setDynamic(!0)
				}, t.Int8Attribute = function (t, e) {
					return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."), new pt(t, e)
				}, t.Uint8Attribute = function (t, e) {
					return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."), new mt(t, e)
				}, t.Uint8ClampedAttribute = function (t, e) {
					return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."), new gt(t, e)
				}, t.Int16Attribute = function (t, e) {
					return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."), new vt(t, e)
				}, t.Uint16Attribute = function (t, e) {
					return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."), new yt(t, e)
				}, t.Int32Attribute = function (t, e) {
					return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."), new bt(t, e)
				}, t.Uint32Attribute = function (t, e) {
					return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."), new xt(t, e)
				}, t.Float32Attribute = function (t, e) {
					return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."), new _t(t, e)
				}, t.Float64Attribute = function (t, e) {
					return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."), new wt(t, e)
				}, t.ClosedSplineCurve3 = Vn, t.SplineCurve3 = Wn, t.Spline = qn, t.AxisHelper = function (t) {
					return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."), new Dn(t)
				}, t.BoundingBoxHelper = function (t, e) {
					return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."), new On(t, e)
				}, t.EdgesHelper = function (t, e) {
					return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."), new me(new EdgesGeometry(t.geometry), new fe({
						color: void 0 !== e ? e : 16777215
					}))
				}, t.WireframeHelper = function (t, e) {
					return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."), new me(new WireframeGeometry(t.geometry), new fe({
						color: void 0 !== e ? e : 16777215
					}))
				}, t.XHRLoader = function (t) {
					return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."), new $e(t)
				}, t.BinaryTextureLoader = function (t) {
					return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."), new ei(t)
				}, t.GeometryUtils = Do, t.ImageUtils = zo, t.Projector = function () {
					console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."), this.projectVector = function (t, e) {
						console.warn("THREE.Projector: .projectVector() is now vector.project()."), t.project(e)
					}, this.unprojectVector = function (t, e) {
						console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."), t.unproject(e)
					}, this.pickingRay = function () {
						console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")
					}
				}, t.CanvasRenderer = function () {
					console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js"), this.domElement = document.createElement("canvas"), this.clear = function () {}, this.render = function () {}, this.setClearColor = function () {}, this.setSize = function () {}
				}, Object.defineProperty(t, "__esModule", {
					value: !0
				})
			})
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			}), e.REPORTERTIMEOUT = e.numberMaterial = e.grayMaterial = e.shadow = e.desk_shadow = e.cylinder_shadow = e.loader = e.FRUSTUMSIZE = e.BLOCK = e.AUDIO = e.CAMERA = e.WAVE = e.GAME = e.PARTICLE = e.BOTTLE = e.COLORS = void 0;
			var n = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				r = (e.COLORS = {
					red: 13387325,
					pureRed: 16711680,
					white: 14209233,
					brown: 5845806,
					pink: 15964855,
					brownDark: 2300175,
					blue: 40951,
					yellow: 16760320,
					pureWhite: 16777215,
					orange: 16231020,
					orangeDark: 16747520,
					black: 0,
					cream: 16119285,
					green: 2924391,
					lightBlue: 13758190,
					cyan: 9692366,
					yellowBrown: 16764811,
					purple: 9083606
				}, e.BOTTLE = {
					headRadius: .945,
					bodyWidth: 2.34,
					bodyDepth: 2.34,
					bodyHeight: 3.2,
					reduction: .005,
					minScale: .5,
					velocityYIncrement: 15,
					velocityY: 135,
					velocityZIncrement: 70
				}),
				a = (e.PARTICLE = {
					radius: .3,
					detail: 2
				}, e.GAME = {
					BOTTOMBOUND: -55,
					TOPBOUND: 41,
					gravity: 720,
					touchmoveTolerance: 20,
					LEFTBOUND: -140,
					topTrackZ: -30,
					rightBound: 90,
					HEIGHT: window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth,
					WIDTH: window.innerHeight < window.innerWidth ? window.innerHeight : window.innerWidth,
					canShadow: !0
				}, e.WAVE = {
					innerRadius: 2.2,
					outerRadius: 3,
					thetaSeg: 25
				}, e.CAMERA = {
					fov: 60
				}, e.AUDIO = {
					success: "res/success.mp3",
					perfect: "res/perfect.mp3",
					scale_loop: "res/scale_loop.mp3",
					scale_intro: "res/scale_intro.mp3",
					restart: "res/start.mp3",
					fall: "res/fall.mp3",
					fall_2: "res/fall_2.mp3",
					combo1: "res/combo1.mp3",
					combo2: "res/combo2.mp3",
					combo3: "res/combo3.mp3",
					combo4: "res/combo4.mp3",
					combo5: "res/combo5.mp3",
					combo6: "res/combo6.mp3",
					combo7: "res/combo7.mp3",
					combo8: "res/combo8.mp3",
					icon: "res/icon.mp3",
					pop: "res/pop.mp3",
					sing: "res/sing.mp3",
					store: "res/store.mp3",
					water: "res/water.mp3"
				}, e.BLOCK = {
					radius: 5,
					width: 10,
					minRadiusScale: .8,
					maxRadiusScale: 1,
					height: 5.5,
					radiusSegments: [4, 50],
					floatHeight: 0,
					minDistance: 1,
					maxDistance: 17,
					minScale: r.minScale,
					reduction: r.reduction,
					moveDownVelocity: .07,
					fullHeight: 5.5 / 21 * 40
				}, e.FRUSTUMSIZE = window.innerHeight / window.innerWidth / 736 * 414 * 60, e.loader = new n.TextureLoader);
			e.cylinder_shadow = new n.MeshBasicMaterial({
				map: a.load("res/cylinder_shadow.png"),
				transparent: !0,
				alphaTest: .01
			}), e.desk_shadow = new n.MeshBasicMaterial({
				map: a.load("res/desk_shadow.png"),
				transparent: !0,
				alphaTest: .01
			}), e.shadow = new n.MeshBasicMaterial({
				map: a.load("res/shadow.png"),
				transparent: !0,
				alphaTest: .01
			}), e.grayMaterial = new n.MeshLambertMaterial({
				map: a.load("res/gray.png")
			}), e.numberMaterial = new n.MeshLambertMaterial({
				map: a.load("res/number.png"),
				alphaTest: .6
			}), e.REPORTERTIMEOUT = 60001
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(5)),
				o = n(i(4)),
				s = i(59),
				h = {
					AJAX_URL: "https://mp.weixin.qq.com"
				},
				l = function () {
					function t() {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t)
					}
					return r(t, null, [{
						key: "onServerConfigForbid",
						value: function (t) {
							this.emmitServerConfigForbid = t
						}
					}, {
						key: "getUserInfo",
						value: function () {
							var t = {
								base_req: {
									session_id: a.default.sessionId,
									fast: 1
								}
							};
							wx.request({
								url: h.AJAX_URL + "/wxagame/wxagame_getuserinfo",
								method: "POST",
								data: t,
								success: function (t) {
									200 === t.statusCode && 0 === t.data.base_resp.errcode && o.default.saveMyUserInfo(t.data)
								},
								fail: function (t) {}
							})
						}
					}, {
						key: "requestLogin",
						value: function (t) {
							t || (t = function () {}), wx.login({
								success: function (e) {
									e.code ? (a.default.setLoginState(e.code), t(!0)) : t(!1)
								},
								fail: function (e) {
									t(!1)
								}
							})
						}
					}, {
						key: "requestFriendsScore",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {};
							if (!a.default.serverConfig || a.default.serverConfig.friends_score_switch)
								if (a.default.sessionId) {
									var e = {
										base_req: {
											session_id: a.default.sessionId,
											fast: 1
										}
									};
									wx.request({
										url: h.AJAX_URL + "/wxagame/wxagame_getfriendsscore",
										method: "POST",
										data: e,
										success: function (e) {
											200 === e.statusCode && 0 === e.data.base_resp.errcode ? t(!0, e.data) : t && t(!1)
										},
										fail: function (e) {
											t(!1, !1)
										}
									})
								} else t(!1)
						}
					}, {
						key: "requestSettlement",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
								e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0,
								i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {},
								n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
							if (a.default.sessionId) {
								var r = {
										score: t,
										times: e,
										game_data: JSON.stringify(n)
									},
									o = {
										base_req: {
											session_id: a.default.sessionId,
											fast: 1
										},
										action_data: (0, s.encrypt)(r, a.default.sessionId)
									};
								wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_settlement",
									method: "POST",
									data: o,
									success: function (t) {
										i(200 === t.statusCode ? 0 === t.data.base_resp.errcode ? !0 : !1 : !1)
									},
									fail: function (t) {
										i(!1)
									}
								})
							} else i(!1)
						}
					}, {
						key: "requestCreateGame",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {};
							if (!a.default.serverConfig || a.default.serverConfig.audience_mode_switch) {
								a.default.sessionId || this.reGetSessionId("requestCreateGame", t);
								var e = {
									base_req: {
										session_id: a.default.sessionId,
										fast: 1
									}
								};
								wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_creategame",
									method: "POST",
									data: e,
									success: function (e) {
										200 === e.statusCode && 0 === e.data.base_resp.errcode ? t(!0, e) : t(!1)
									},
									fail: function (e) {
										t(!1)
									}
								})
							} else t(!1, "当前围观人数过多，请稍后再试")
						}
					}, {
						key: "reGetSessionId",
						value: function (t, e) {
							var i = this;
							o.default.clearSessionId(), this.requestLogin(function (n) {
								n ? e ? i[t](e) : i[t]() : e && e(!1)
							})
						}
					}, {
						key: "requestInit",
						value: function () {
							if (a.default.sessionId)
								if (a.default.serverConfig) {
									var t = a.default.serverConfig.version;
									this.requestServerInit(t)
								} else this.requestServerInit(0)
						}
					}, {
						key: "requestServerInit",
						value: function (t) {
							var e = {
								base_req: {
									session_id: a.default.sessionId,
									fast: 1
								},
								version: t
							};
							wx.request({
								url: h.AJAX_URL + "/wxagame/wxagame_init",
								method: "POST",
								data: e,
								success: function (t) {
									200 === t.statusCode && 0 === t.data.base_resp.errcode && (t.data.version > a.default.serverConfig.version || !a.default.serverConfig.version) && (a.default.setServerConfig(t.data), o.default.saveServerConfig(t.data))
								},
								fail: function (t) {}
							})
						}
					}, {
						key: "getGroupScore",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {};
							if (a.default.sessionId) {
								var e = {
									base_req: {
										session_id: a.default.sessionId,
										fast: 1,
										group_info: {
											share_ticket: a.default.shareTicket
										}
									}
								};
								wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_getgrouprank",
									method: "POST",
									data: e,
									success: function (e) {
										200 === e.statusCode && 0 === e.data.base_resp.errcode ? t(!0, e) : t(!1)
									},
									fail: function (e) {
										t(!1)
									}
								})
							} else t(!1)
						}
					}, {
						key: "createPK",
						value: function (t) {
							return new Promise(function (e, i) {
								if (a.default.sessionId) {
									wx.showLoading();
									var n = {
										base_req: {
											session_id: a.default.sessionId,
											fast: 1
										},
										score: t
									};
									wx.request({
										url: h.AJAX_URL + "/wxagame/wxagame_createpk",
										method: "POST",
										data: n,
										success: function (t) {
											200 === t.statusCode && 0 === t.data.base_resp.errcode ? (a.default.setPkId(t.data.pk_id), e()) : i()
										},
										fail: function (t) {
											i()
										},
										complete: function () {
											wx.hideLoading()
										}
									})
								} else i()
							})
						}
					}, {
						key: "getBattleData",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {},
								e = arguments[1];
							if (a.default.sessionId && e) {
								var i = {
									base_req: {
										session_id: a.default.sessionId,
										fast: 1
									},
									pk_id: e
								};
								a.default.shareTicket && (i.base_req.group_info = {
									share_ticket: a.default.shareTicket
								}), wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_getpkinfo",
									method: "POST",
									data: i,
									success: function (e) {
										200 === e.statusCode && 0 === e.data.base_resp.errcode ? t(!0, e) : t(!1)
									},
									fail: function (e) {
										t(!1)
									}
								})
							} else t(!1)
						}
					}, {
						key: "updatepkinfo",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {},
								e = arguments[1],
								i = arguments[2];
							if (a.default.sessionId && e) {
								var n = {
									base_req: {
										session_id: a.default.sessionId,
										fast: 1
									},
									pk_id: e,
									score: i
								};
								wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_updatepkinfo",
									method: "POST",
									data: n,
									success: function (e) {
										200 === e.statusCode && 0 === e.data.base_resp.errcode ? t(!0, e) : t(!1)
									},
									fail: function (e) {
										t(!1)
									}
								})
							} else t(!1)
						}
					}, {
						key: "quitGame",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {};
							if (a.default.gameId || a.default.sessionId) {
								var e = {
									base_req: {
										session_id: a.default.sessionId,
										fast: 1
									},
									game_id: a.default.gameId
								};
								wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_quitgame",
									method: "POST",
									data: e,
									success: function (e) {
										200 === e.statusCode && 0 === e.data.base_resp.errcode ? t(!0, e) : t(!1)
									},
									fail: function (e) {
										t(!1)
									}
								})
							} else t(!1)
						}
					}, {
						key: "syncop",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {};
							if (a.default.gameId || a.default.sessionId) {
								var e = {
									base_req: {
										session_id: a.default.sessionId,
										fast: 1
									},
									game_id: a.default.gameId
								};
								wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_syncop",
									method: "POST",
									data: e,
									success: function (e) {
										200 === e.statusCode && 0 === e.data.base_resp.errcode ? t(!0, e) : t(!1)
									},
									fail: function (e) {
										t(!1)
									}
								})
							} else callback(!1)
						}
					}, {
						key: "sendReport",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
								e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
							if (a.default.sessionId) {
								var i = {
									base_req: {
										session_id: a.default.sessionId,
										fast: 1,
										client_info: e
									},
									report_list: t
								};
								wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_bottlereport",
									method: "POST",
									data: i,
									success: function (t) {},
									fail: function () {}
								})
							}
						}
					}, {
						key: "badReport",
						value: function (t, e) {
							var i = wx.getSystemInfoSync(),
								n = a.default.sessionId || "",
								t = "model:" + i.model + ",SDKVersion:" + i.SDKVersion + ",version:" + i.version + ",sessionId:" + n + ",errmsg:" + t + ",stack:" + e;
							wx.request({
								url: "https://badjs.weixinbridge.com/badjs",
								data: {
									id: 130,
									level: 4,
									msg: t
								},
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "sendServerError",
						value: function (t) {
							if (a.default.sessionId) {
								var e = {
									base_req: {
										session_id: a.default.sessionId,
										fast: 1
									},
									id: 1,
									key: t
								};
								wx.request({
									url: h.AJAX_URL + "/wxagame/wxagame_jsreport",
									method: "POST",
									data: e,
									success: function (t) {},
									fail: function () {}
								})
							}
						}
					}]), t
				}();
			e.default = l
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			}), e.TweenAnimation = e.customAnimation = void 0;
			var n = function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(41)),
				r = -1,
				a = r - 1;
			(e.customAnimation = {}).to = function (t, e, i) {
				e *= 1e3;
				var n = i.delay || 0;
				for (var r in i) "delay" === r ? n = i[r] : "onComplete" === r || "ease" === r || setTimeout(function (n) {
					return function () {
						o(t[n], i[n], e, i.ease || "Linear", function (e, r) {
							t[n] = e, r && i.onComplete && i.onComplete()
						})
					}
				}(r), 1e3 * n)
			};
			var o = e.TweenAnimation = function (t, e, i, o, s) {
				var h = ++r,
					l = function (t) {
						return "function" == typeof t
					},
					c = function (t) {
						return "number" == typeof t
					},
					u = function (t) {
						return "string" == typeof t
					},
					d = function (t) {
						if (c(t)) return t;
						if (u(t)) {
							if (/\d+m?s$/.test(t)) return /ms/.test(t) ? 1 * t.replace("ms", "") : 1e3 * t.replace("s", "");
							if (/^\d+$/.test(t)) return +t
						}
						return -1
					};
				if (!c(t) || !c(e)) return window.console && console.error("from和to两个参数必须且为数值"), 0;
				var f = n.default;
				if (!f) return window.console && console.error("缓动算法函数缺失"), 0;
				var p = {
						duration: 300,
						easing: "Linear",
						callback: function () {}
					},
					m = function (t) {
						l(t) ? p.callback = t : -1 != d(t) ? p.duration = d(t) : u(t) && (p.easing = t)
					};
				m(i), m(o), m(s), window.requestAnimationFrame || (requestAnimationFrame = function (t) {
					setTimeout(t, 17)
				});
				var g = -1,
					v = Math.ceil(p.duration / 17);
				p.easing = p.easing.slice(0, 1).toUpperCase() + p.easing.slice(1);
				var y, b = p.easing.split(".");
				if (1 == b.length ? y = f[b[0]] : 2 == b.length && (y = f[b[0]] && f[b[0]][b[1]]), 0 != l(y)) {
					var x = Date.now(),
						_ = Date.now();
					! function i() {
						var n = Date.now(),
							r = n - _,
							o = Math.ceil(1e3 / r);
						if (_ = n, r > 100) requestAnimationFrame(i);
						else {
							if (o >= 30) g++;
							else {
								var s = Math.floor((n - x) / 17);
								g = s > g ? s : g + 1
							}
							var l = y(g, t, e - t, v);
							g <= v && h > a ? (p.callback(l), requestAnimationFrame(i)) : g > v && h > a && p.callback(e, !0)
						}
					}()
				} else console.error('没有找到名为"' + p.easing + '"的动画算法')
			};
			o.killAll = function () {
				a = r
			}
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t() {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t)
					}
					return n(t, null, [{
						key: "getFriendsScore",
						value: function () {
							try {
								var t = wx.getStorageSync("friends_score") || [];
								return t = t && t.ts ? t.ts < Date.now() ? [] : t.data : []
							} catch (t) {
								return []
							}
						}
					}, {
						key: "saveFriendsScore",
						value: function (t) {
							wx.setStorage({
								key: "friends_score",
								data: t,
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "saveMyUserInfo",
						value: function (t) {
							wx.setStorage({
								key: "my_user_info",
								data: t,
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "saveHeighestScore",
						value: function (t) {
							wx.setStorage({
								key: "my_heighest_score",
								data: t,
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "getHeighestScore",
						value: function () {
							try {
								return wx.getStorageSync("my_heighest_score") || !1
							} catch (t) {
								return !1
							}
						}
					}, {
						key: "getMyUserInfo",
						value: function () {
							try {
								return wx.getStorageSync("my_user_info") || !1
							} catch (t) {
								return !1
							}
						}
					}, {
						key: "saveSessionId",
						value: function (t) {
							wx.setStorage({
								key: "session_id",
								data: t,
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "getSessionId",
						value: function (t) {
							try {
								return wx.getStorageSync("session_id") || ""
							} catch (t) {
								return ""
							}
						}
					}, {
						key: "clearSessionId",
						value: function () {
							wx.removeStorage({
								key: "session_id",
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "saveServerConfig",
						value: function (t) {
							wx.setStorage({
								key: "server_config",
								data: t,
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "getServerConfig",
						value: function () {
							try {
								return wx.getStorageSync("server_config") || 0
							} catch (t) {
								return 0
							}
						}
					}, {
						key: "getFirstBlood",
						value: function () {
							try {
								return wx.getStorageSync("first_blood") || 0
							} catch (t) {
								return 0
							}
						}
					}, {
						key: "saveFirstBlood",
						value: function () {
							wx.setStorage({
								key: "first_blood",
								data: 1,
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "getHistoryTimes",
						value: function () {
							try {
								return wx.getStorageSync("history_Times2") || !1
							} catch (t) {
								return !1
							}
						}
					}, {
						key: "saveHistoryTimes",
						value: function (t) {
							wx.setStorage({
								key: "history_Times2",
								data: t,
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "saveActionData",
						value: function (t) {
							wx.setStorage({
								key: "action_data0",
								data: t,
								success: function (t) {
									console.log("Storage save actionData0 success", t)
								},
								fail: function (t) {
									console.log("Storage save actionData0 fail", t)
								}
							})
						}
					}, {
						key: "getActionData",
						value: function () {
							try {
								return wx.getStorageSync("action_data0") || !1
							} catch (t) {
								return !1
							}
						}
					}, {
						key: "saveWeekBestScore",
						value: function (t) {
							wx.setStorage({
								key: "weeek_best_score0",
								data: t,
								success: function (t) {},
								fail: function (t) {}
							})
						}
					}, {
						key: "getWeekBestScore",
						value: function () {
							try {
								var t = wx.getStorageSync("weeek_best_score0") || 0;
								return t && t.ts && (t = t.ts < Date.now() ? 0 : t.data), console.log("Storage get weeek_best_score0 success", t), t
							} catch (t) {
								return 0
							}
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t() {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t)
					}
					return n(t, null, [{
						key: "init",
						value: function () {
							this.sessionId = "", this.gameId = "", this.gameTicket = "", this.serverConfig = "", this.shareTicket = "", this.pkId = "", this.serverConfig = ""
						}
					}, {
						key: "setLoginState",
						value: function (t) {
							this.sessionId = t
						}
					}, {
						key: "setGameId",
						value: function (t) {
							this.gameId = t
						}
					}, {
						key: "setGameTicket",
						value: function (t) {
							this.gameTicket = t
						}
					}, {
						key: "setServerConfig",
						value: function (t) {
							this.serverConfig = t
						}
					}, {
						key: "setShareTicket",
						value: function (t) {
							this.shareTicket = t
						}
					}, {
						key: "setPkId",
						value: function (t) {
							this.pkId = t
						}
					}, {
						key: "clearPkId",
						value: function () {
							this.pkId = ""
						}
					}, {
						key: "clearGameId",
						value: function () {
							this.gameId = ""
						}
					}, {
						key: "clearShareTicket",
						value: function () {
							this.ShareTicket = ""
						}
					}, {
						key: "clearGameTicket",
						value: function () {
							this.gameTicket = ""
						}
					}, {
						key: "setServerConfig",
						value: function (t) {
							this.serverConfig = t
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			}), e.shareGroupRank = function () {
				var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {};
				wx.getNetworkType({
					success: function (e) {
						"none" !== e.networkType ? wx.updateShareMenu({
							withShareTicket: !0,
							success: function () {
								wx.shareAppMessage({
									title: "群雄逐鹿，看看你第几",
									query: "mode=groupShare",
									imageUrl: "http://mmbiz.qpic.cn/mmbiz_png/icTdbqWNOwNQ0ia79enzYJBrAavqMRykpovYxSA9RRTwIjde6a68ZCczLMBBd8eSoOyTRyp2Codc5IObdeqZVFyw/0?wx_fmt=png",
									success: function (e) {
										t(!0, 1)
									},
									fail: function (e) {
										t(!1)
									}
								})
							}
						}) : (t(!1), wx.showModal({
							title: "提示",
							content: "网络状态异常",
							showCancel: !1
						}))
					}
				})
			}, e.shareBattle = function (t, e) {
				var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {};
				o.getShareCard({
					score: e,
					type: "shareBattle"
				}, function (e) {
					var n = "";
					try {
						n = e.toTempFilePathSync()
					} catch (t) {
						console.log("shareBattle: ", t)
					}
					t && wx.updateShareMenu({
						withShareTicket: !0,
						success: function () {
							wx.shareAppMessage({
								title: "小试牛刀，不服来战",
								query: "mode=battle&pkId=" + t,
								imageUrl: n,
								success: function (e) {
									i(!0, 1), console.log("mode=battle&pkId=" + t)
								},
								fail: function () {
									i(!1)
								}
							})
						},
						fail: function (t) {
							i(!1)
						}
					})
				})
			}, e.shareObserve = function () {
				var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {},
					e = a.default.getMyUserInfo();
				e || (e = {
					nickname: "",
					headimg: ""
				}), console.log("query: ", "gameId=" + r.default.gameId + "&mode=observe&nickName=" + e.nickname + "&headimg=" + e.headimg), wx.updateShareMenu({
					withShareTicket: !0,
					success: function () {
						wx.shareAppMessage({
							title: "即刻起跳，速来围观",
							query: "gameId=" + r.default.gameId + "&mode=observe&nickName=" + e.nickname + "&headimg=" + e.headimg,
							imageUrl: "http://mmbiz.qpic.cn/mmbiz_png/icTdbqWNOwNQ0ia79enzYJBiaBtXsYrvBsYBdBdDtKE7y638J84JKPckcOtFMp4QunIWFGc7pibQLm13s9fKZ9ic9ew/0?wx_fmt=png",
							success: function (e) {
								t(!0, 1)
							},
							fail: function (e) {
								t(!1)
							}
						})
					},
					fail: function () {
						t(!1)
					}
				})
			}, e.pureShare = function (t, e) {
				o.getShareCard({
					type: t,
					score: e
				}, function (e) {
					var i = "";
					try {
						i = e.toTempFilePathSync()
					} catch (t) {
						console.log("pureShare: ", t)
					}
					var n = "";
					"rank" == t ? n = "跳遍天下，已无敌手" : "history" == t && (n = "不好意思，又破纪录了"), wx.shareAppMessage({
						title: n,
						imageUrl: i,
						success: function (t) {},
						fail: function (t) {}
					})
				})
			};
			var r = n(i(5)),
				a = n(i(4)),
				o = new(n(i(50)).default)({})
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				a = (i(1), function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(38))),
				o = function () {
					function t(e, i) {
						if (function (t, e) {
								if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
							}(this, t), this.material = new r.MeshBasicMaterial({
								color: i.fillStyle || 16777215,
								transparent: !0
							}), i.opacity && (this.material.opacity = i.opacity), this.options = i || {}, this.obj = new r.Object3D, this.obj.name = "text", i.chinese) {
							var n = new r.Mesh(new r.TextGeometry(e, {
								font: a.default,
								size: 1,
								height: .1
							}), this.material);
							this.obj.add(n), "center" == i.textAlign && (n.position.x = 1.1 * e.length / -2)
						} else {
							this.scores = [], this.plus = new r.Mesh(new r.TextGeometry("+", {
								font: a.default,
								size: 3,
								height: .1
							}), this.material);
							for (var o = this.options.sumScore ? 5 : 2, s = 0; s < 10; ++s) {
								for (var h = [], l = new r.TextGeometry(s, {
										font: a.default,
										size: 3,
										height: .1
									}), c = 0; c < o; ++c) {
									var u = new r.Mesh(l, this.material);
									u.using = !1, h.push(u)
								}
								this.scores.push(h)
							}
							this.setScore(e)
						}
					}
					return n(t, [{
						key: "setScore",
						value: function (t) {
							var e = 2.5 * (t = t.toString()).length,
								i = this.options.sumScore ? 5 : 2,
								n = "center" == this.options.textAlign ? -e / 2 : 0;
							this.options.plusScore && (n = -(e + 2.5) / 2, this.plus.position.x = n, this.obj.add(this.plus), n += 2.5);
							for (var r = 0, a = this.scores.length; r < a; ++r)
								for (s = 0; s < i; ++s) this.scores[r][s].using && (this.obj.remove(this.scores[r][s]), this.scores[r][s].using = !1);
							for (var r = 0, a = t.length; r < a; ++r) {
								for (var o = this.scores[t[r]], s = 0; s < i; ++s)
									if (!o[s].using) {
										o[s].position.x = n, o[s].using = !0, this.obj.add(o[s]);
										break
									}
								n += 2.5
							}
						}
					}, {
						key: "changeStyle",
						value: function (t) {
							Object.assign(this.options, t), this.obj.updateMatrix()
						}
					}]), t
				}();
			e.default = o
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = void 0,
				r = function () {
					return (n = (9301 * n + 49297) % 233280) / 233280
				};
			e.setRandomSeed = function (t) {
				n = t
			}, e.random = function () {
				if (0 === arguments.length) return r();
				if (1 === arguments.length) {
					var t = arguments[0];
					return Math.floor(r() * t)
				}
				var e = arguments[0],
					i = arguments[1];
				return Math.floor(r() * (i - e)) + e
			}
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(54)),
				o = n(i(53)),
				s = n(i(52)),
				h = n(i(51)),
				l = i(6),
				c = n(i(2)),
				u = function () {
					function t(e, i) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.name = "single", this.game = e, this.gameCtrl = this.game.gameCtrl, this.model = this.game.gameModel, this.view = this.game.gameView, this.modeCtrl = i, this.netWorkCtrl = this.gameCtrl.netWorkCtrl, this.gameSocket = this.game.gameSocket, this.startPage = new a.default(e), this.gamePage = new o.default(e), this.gameOverPage = new s.default(e), this.friendRankPage = new h.default(e), this.currentPage = null, this.lastPage = null, this.socketTimeout = null
					}
					return r(t, [{
						key: "init",
						value: function (t) {
							this.startPage.show(), this.model.setStage(this.startPage.name), this.currentPage = this.startPage
						}
					}, {
						key: "clickStart",
						value: function () {
							this.hideCurrentPage(), this.gamePage.show(), this.game.replayGame(), this.model.setStage(this.gamePage.name), this.currentPage = this.gamePage
						}
					}, {
						key: "showGameOverPage",
						value: function () {
							this.hideCurrentPage(), this.gameOverPage.show(), this.model.clearPkId(), this.model.setStage(this.gameOverPage.name), this.currentPage = this.gameOverPage
						}
					}, {
						key: "gameOverClickReplay",
						value: function () {
							this.clickStart()
						}
					}, {
						key: "showFriendRank",
						value: function () {
							this.lastPage = this.currentPage, this.hideCurrentPage(), this.friendRankPage.show(), this.model.setStage(this.friendRankPage.name), this.currentPage = this.friendRankPage
						}
					}, {
						key: "friendRankReturn",
						value: function () {
							this.hideCurrentPage(), this.lastPage.show(), this.model.setStage(this.lastPage.name), this.currentPage = this.lastPage
						}
					}, {
						key: "shareGroupRank",
						value: function () {
							var t = this;
							(0, l.shareGroupRank)(function (e, i) {
								t.gameCtrl.afterShareGroupRank(e, i)
							})
						}
					}, {
						key: "clickRank",
						value: function () {
							this.showFriendRank()
						}
					}, {
						key: "shareBattleCard",
						value: function () {
							var t = this,
								e = this.model.getSessionId(),
								i = this.model.currentScore,
								n = this.model.getPkId();
							e ? n ? this.afterHavePkId() : c.default.createPK(i).then(function () {
								t.afterHavePkId()
							}, function () {
								t.getPKErr()
							}).catch(function (t) {
								return console.log(t)
							}) : this.view.showNoSession()
						}
					}, {
						key: "afterHavePkId",
						value: function () {
							var t = this,
								e = this.model.getPkId(),
								i = this.model.currentScore;
							(0, l.shareBattle)(e, i, function (e, i) {
								t.gameCtrl.afterShareBattle(e, i)
							})
						}
					}, {
						key: "getPKErr",
						value: function () {
							this.view.showGetPkIdFail()
						}
					}, {
						key: "shareObservCard",
						value: function () {
							this.gamePage.hideLookersShare(), this.model.setStage("loading"), wx.showLoading();
							this.model.getSessionId() ? this.afterLogin(!0) : this.netWorkCtrl.netWorkLogin(this.afterLogin.bind(this))
						}
					}, {
						key: "afterLogin",
						value: function (t) {
							var e = this;
							t ? c.default.requestCreateGame(function (t, i) {
								t ? (e.model.setGameId(i.data.game_id), e.model.setGameTicket(i.data.up_op_ticket), e.shareObservCardA()) : e.shareObservCardFail(i)
							}) : this.shareObservCardFail()
						}
					}, {
						key: "shareObservCardFail",
						value: function (t) {
							this.view.showShareObserveCardFail(t), this.model.clearGameId(), this.model.clearGameTicket(), "loading" == this.model.stage && this.model.setStage("game"), this.clearSocketTimeout(), this.gameSocket.close(), wx.hideLoading()
						}
					}, {
						key: "shareObservCardA",
						value: function () {
							this.socketTimeout = setTimeout(this.shareObservCardFail.bind(this), 5e3), this.gameSocket.connectSocket()
						}
					}, {
						key: "socketJoinSuccess",
						value: function (t) {
							wx.hideLoading(), t ? (this.clearSocketTimeout(), this.shareObservCardB()) : this.shareObservCardFail()
						}
					}, {
						key: "shareObservCardB",
						value: function () {
							var t = this;
							(0, l.shareObserve)(function (e, i) {
								e && t.gameCtrl.afterShareObserveCard(i), setTimeout(function () {
									"loading" == t.model.stage && t.model.setStage("game"), t.modeCtrl.singleChangeToPlayer(), t.currentPage = null
								}, 50)
							})
						}
					}, {
						key: "clearSocketTimeout",
						value: function () {
							null != this.socketTimeout && (clearTimeout(this.socketTimeout), this.socketTimeout = null)
						}
					}, {
						key: "wxOnhide",
						value: function () {}
					}, {
						key: "wxOnshow",
						value: function () {}
					}, {
						key: "destroy",
						value: function () {
							this.hideCurrentPage(), this.currentPage = null, this.model.clearGameId(), this.model.clearGameTicket(), this.clearSocketTimeout(), this.game.resetScene()
						}
					}, {
						key: "hideCurrentPage",
						value: function () {
							this.currentPage && this.currentPage.hide()
						}
					}]), t
				}();
			e.default = u
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(57)),
				a = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), e = e || {}, this._options = e, this._itemSize = e.itemSize || 0, this._innerOffsetHeight = e.innerOffsetHeight || 0, this._outterOffsetHeight = e.outterOffsetHeight || 0, this._extent = this._innerOffsetHeight - this._outterOffsetHeight, this._position = 0, this._scroll = new r.default(this._extent), this.updatePosition()
					}
					return n(t, [{
						key: "onTouchStart",
						value: function () {
							this._startPosition = this._position, this._lastChangePos = this._startPosition, this._startPosition > 0 ? this._startPosition /= .5 : this._startPosition < -this._extent && (this._startPosition = (this._startPosition + this._extent) / .5 - this._extent), this._animation && (this._animation.cancel(), this._scrolling = !1), this.updatePosition()
						}
					}, {
						key: "onTouchMove",
						value: function (t, e) {
							var i = this._startPosition;
							(i += e) > 0 ? i *= .5 : i < -this._extent && (i = .5 * (i + this._extent) - this._extent), this._position = i, this.updatePosition()
						}
					}, {
						key: "onTouchEnd",
						value: function (t, e, i) {
							var n = this;
							this._scroll.set(this._position, i.y), this._scrolling = !0, this._lastChangePos = this._position, this._animation = this.animation(this._scroll, function () {
								var t = (Date.now() - n._scroll._startTime) / 1e3,
									e = n._scroll.x(t);
								n._position = e, n.updatePosition()
							}, function () {
								n._scrolling = !1
							})
						}
					}, {
						key: "scrollTo",
						value: function (t) {
							this._animation && (this._animation.cancel(), this._scrolling = !1), "number" == typeof t && (this._position = -t), this._position < -this._extent ? this._position = -this._extent : this._position > 0 && (this._position = 0), this.updatePosition()
						}
					}, {
						key: "updatePosition",
						value: function () {
							this._options.updatePosition(this._position)
						}
					}, {
						key: "animation",
						value: function (t, e, i) {
							function n(e, i, r, a) {
								if (!e || !e.cancelled) {
									r(i);
									var o = t.done();
									o || e.cancelled || (e.id = requestAnimationFrame(n.bind(null, e, i, r, a))), o && a && a(i)
								}
							}
							var r = {
								id: 0,
								cancelled: !1
							};
							return n(r, t, e, i), {
								cancel: function (t) {
									t && t.id && cancelAnimationFrame(t.id), t && (t.cancelled = !0)
								}.bind(null, r),
								model: t
							}
						}
					}]), t
				}();
			e.default = a
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				a = i(1),
				o = i(3),
				s = i(8),
				h = {
					green: 6393958,
					white: 15658734,
					lightGreen: 8104320,
					gray: 10395294,
					black: 7171437,
					lightGray: 14408667,
					lightBlack: 13355979,
					brown: 6776679,
					middleLightGreen: 125084537,
					middleLightGray: 12303291,
					middleLightBlack: 8947848
				},
				l = new r.BoxGeometry(2 * a.BLOCK.radius + .02, a.BLOCK.height + .04, 2 * a.BLOCK.radius + .02),
				c = new r.BoxGeometry(2 * a.BLOCK.radius, a.BLOCK.height, 2 * a.BLOCK.radius),
				u = new r.PlaneGeometry(11, 11),
				d = a.GAME.canShadow ? r.MeshLambertMaterial : r.MeshBasicMaterial,
				f = function () {
					function t(e, i) {
						var n = this;
						if (function (t, e) {
								if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
							}(this, t), this.radius = a.BLOCK.radius, this.status = "stop", this.scale = 1, this.type = "green", this.types = ["green", "black", "gray"], this.radiusScale = 1, this.obj = new r.Object3D, this.obj.name = "block", this.body = new r.Object3D, this.greenMaterial = new r.MeshLambertMaterial({
								color: h.green
							}), this.whiteMaterial = new r.MeshLambertMaterial({
								color: h.white
							}), this.shadowWidth = 11, 2 == e || 7 == e ? (this.shadow = new r.Mesh(u, a.desk_shadow), this.shadow.position.set(0, -a.BLOCK.height / 2 - .001 * e, -4.5), this.shadow.scale.y = 1.2) : 3 == e || 21 == e || 27 == e || 28 == e || 29 == e || 31 == e ? (this.shadow = new r.Mesh(u, a.cylinder_shadow), this.shadow.position.set(-.1, -a.BLOCK.height / 2 - .001 * e, -2.8), this.shadow.scale.y = 1.4, this.shadow.scale.x = 1) : (this.shadow = new r.Mesh(u, a.shadow), this.shadow.position.set(-.74, -a.BLOCK.height / 2 - .001 * e, -2.73), this.shadow.scale.y = 1.4), this.shadow.rotation.x = -Math.PI / 2, this.order = e, this.radiusSegments = 4, this.height = a.BLOCK.height, this.canChange = !0, 0 == e) {
							var o = [this.greenMaterial, this.whiteMaterial],
								s = new r.Geometry,
								f = 3,
								p = (a.BLOCK.height - f) / 2,
								m = new r.BoxGeometry(2 * a.BLOCK.radius, p, 2 * a.BLOCK.radius);
							this.geometry = m;
							w = new r.BoxGeometry(2 * a.BLOCK.radius, f, 2 * a.BLOCK.radius);
							this.merge(s, m, 0, [{
								x: 0,
								y: -f / 2 - p / 2,
								z: 0
							}, {
								x: 0,
								y: f / 2 + p / 2,
								z: 0
							}]), this.merge(s, w, 1, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (1 == e) {
							var o = [this.greenMaterial, this.whiteMaterial],
								s = new r.Geometry,
								g = a.BLOCK.height / 5,
								v = new r.BoxGeometry(2 * a.BLOCK.radius, g, 2 * a.BLOCK.radius);
							this.geometry = v, this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}, {
								x: 0,
								y: -2 * g,
								z: 0
							}, {
								x: 0,
								y: 2 * g,
								z: 0
							}]), this.merge(s, v, 1, [{
								x: 0,
								y: -g,
								z: 0
							}, {
								x: 0,
								y: g,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (2 == e) {
							var o = [this.greenMaterial, this.whiteMaterial],
								s = new r.Geometry;
							this.radiusSegments = 50;
							var g = 5,
								y = a.BLOCK.height - g,
								b = new r.CylinderGeometry(a.BLOCK.radius - 4, a.BLOCK.radius - 2, g, 50),
								x = new r.CylinderGeometry(a.BLOCK.radius, a.BLOCK.radius, y, 50);
							this.geometry = x, this.merge(s, b, 1, [{
								x: 0,
								y: -(a.BLOCK.height - g) / 2,
								z: 0
							}]), this.merge(s, x, 0, [{
								x: 0,
								y: g + y / 2 - a.BLOCK.height / 2,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (3 == e) {
							this.radiusSegments = 50, this.middleLightGreenMaterial = new r.MeshLambertMaterial({
								color: h.middleLightGreen
							});
							var o = [this.greenMaterial, this.whiteMaterial, this.middleLightGreenMaterial],
								s = new r.Geometry,
								g = 5,
								y = a.BLOCK.height - g,
								b = new r.CylinderGeometry(a.BLOCK.radius, a.BLOCK.radius, g, 50),
								x = new r.CylinderGeometry(a.BLOCK.radius, a.BLOCK.radius, y, 50);
							this.geometry = x;
							(_ = new r.RingGeometry(.6 * a.BLOCK.radius, .8 * a.BLOCK.radius, 30)).rotateX(-Math.PI / 2), this.merge(s, b, 1, [{
								x: 0,
								y: -(a.BLOCK.height - g) / 2,
								z: 0
							}]), this.merge(s, x, 0, [{
								x: 0,
								y: g + y / 2 - a.BLOCK.height / 2,
								z: 0
							}]), this.merge(s, _, 2, [{
								x: 0,
								y: a.BLOCK.height / 2 + .01,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (4 == e) {
							var o = [this.greenMaterial, this.whiteMaterial],
								s = new r.Geometry,
								v = c;
							this.geometry = v, this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]);
							var _ = new r.RingGeometry(1, 2, 30, 1);
							this.merge(s, _, 1, [{
								x: 0,
								y: 0,
								z: a.BLOCK.radius + .01
							}]), _.rotateY(-Math.PI / 2), this.merge(s, _, 1, [{
								x: -a.BLOCK.radius - .01,
								y: 0,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (5 == e) {
							var o = [this.greenMaterial, this.whiteMaterial],
								s = new r.Geometry,
								f = 3,
								p = (a.BLOCK.height - f) / 2,
								m = new r.BoxGeometry(2 * a.BLOCK.radius, p, 2 * a.BLOCK.radius),
								w = new r.BoxGeometry(2 * a.BLOCK.radius, f, 2 * a.BLOCK.radius);
							this.merge(s, m, 0, [{
								x: 0,
								y: -f / 2 - p / 2,
								z: 0
							}, {
								x: 0,
								y: f / 2 + p / 2,
								z: 0
							}]), this.merge(s, w, 1, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (6 == e) {
							var o = [this.greenMaterial, this.whiteMaterial],
								s = new r.Geometry,
								f = 3,
								p = (a.BLOCK.height - f) / 2,
								m = new r.BoxGeometry(2 * a.BLOCK.radius, p, 2 * a.BLOCK.radius),
								w = new r.BoxGeometry(2 * a.BLOCK.radius, f, 2 * a.BLOCK.radius);
							this.merge(s, m, 0, [{
								x: 0,
								y: -f / 2 - p / 2,
								z: 0
							}, {
								x: 0,
								y: f / 2 + p / 2,
								z: 0
							}]), this.merge(s, w, 1, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (7 == e) {
							var o = [this.greenMaterial, this.whiteMaterial],
								s = new r.Geometry;
							this.radiusSegments = 50;
							var g = 5,
								y = a.BLOCK.height - g,
								b = new r.CylinderGeometry(a.BLOCK.radius - 4, a.BLOCK.radius - 2, g, 50),
								x = new r.CylinderGeometry(a.BLOCK.radius, a.BLOCK.radius, y, 50);
							this.geometry = x, this.merge(s, b, 1, [{
								x: 0,
								y: -(a.BLOCK.height - g) / 2,
								z: 0
							}]), this.merge(s, x, 0, [{
								x: 0,
								y: g + y / 2 - a.BLOCK.height / 2,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (8 == e) {
							var o = [this.greenMaterial, this.whiteMaterial],
								s = new r.Geometry,
								g = a.BLOCK.height / 5,
								v = new r.BoxGeometry(2 * a.BLOCK.radius, g, 2 * a.BLOCK.radius);
							this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}, {
								x: 0,
								y: -2 * g,
								z: 0
							}, {
								x: 0,
								y: 2 * g,
								z: 0
							}]), this.merge(s, v, 1, [{
								x: 0,
								y: -g,
								z: 0
							}, {
								x: 0,
								y: g,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (9 == e) {
							var o = [new r.MeshLambertMaterial({
									color: 15563832
								}), C = new r.MeshBasicMaterial({
									map: a.loader.load("res/game.png"),
									transparent: !0
								})],
								s = new r.Geometry,
								v = c;
							this.geometry = v, this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.merge(s, new r.PlaneGeometry(5, 5), 1, [{
								x: 0,
								y: .1,
								z: a.BLOCK.radius + .01
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (10 == e) {
							var o = [new r.MeshLambertMaterial({
									color: 16508510
								}), C = new r.MeshBasicMaterial({
									map: a.loader.load("res/emotion.png"),
									transparent: !0
								})],
								s = new r.Geometry,
								v = c,
								M = new r.CylinderGeometry(2, 2, 1, 50),
								T = new r.PlaneGeometry(1.5, 1.5);
							this.geometry = v, this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), M.rotateX(Math.PI / 2), this.merge(s, M, 0, [{
								x: 0,
								y: 0,
								z: a.BLOCK.radius + .51
							}]), M.rotateZ(Math.PI / 2), M.rotateY(Math.PI / 2), this.merge(s, M, 0, [{
								x: -a.BLOCK.radius - .51,
								y: 0,
								z: 0
							}]), this.merge(s, T, 1, [{
								x: 0,
								y: 0,
								z: a.BLOCK.radius + 1.02
							}]), T.rotateY(-Math.PI / 2), this.merge(s, T, 1, [{
								x: -a.BLOCK.radius - 1.02,
								y: 0,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (11 == e) {
							var v = c,
								S = new r.BoxGeometry(3, 2, 4);
							this.geometry = v;
							var E = new r.MeshLambertMaterial({
									color: 11855938
								}),
								C = new r.MeshBasicMaterial({
									map: a.loader.load("res/green_face.png"),
									transparent: !0
								}),
								T = new r.PlaneGeometry(6, 3),
								o = [E, C],
								s = new r.Geometry;
							this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.merge(s, T, 1, [{
								x: .5,
								y: -1,
								z: a.BLOCK.radius + .01
							}]), S.rotateZ(Math.PI / 5), this.merge(s, S, 0, [{
								x: -a.BLOCK.radius - 1,
								y: 1,
								z: 2.5
							}]), S.rotateZ(-2 * Math.PI / 5), this.merge(s, S, 0, [{
								x: a.BLOCK.radius,
								y: 1,
								z: 2.5
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (12 == e) {
							var v = c,
								S = new r.BoxGeometry(3, 2, 4);
							this.geometry = v;
							var E = new r.MeshLambertMaterial({
									color: 15921906
								}),
								C = new r.MeshLambertMaterial({
									map: a.loader.load("res/white_face.png")
								}),
								T = new r.PlaneGeometry(6, 3),
								o = [E, C],
								s = new r.Geometry;
							this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.merge(s, T, 1, [{
								x: .5,
								y: -1,
								z: a.BLOCK.radius + .01
							}]), S.rotateZ(Math.PI / 5), this.merge(s, S, 0, [{
								x: -a.BLOCK.radius - 1,
								y: 1,
								z: 2.5
							}]), S.rotateZ(-2 * Math.PI / 5), this.merge(s, S, 0, [{
								x: a.BLOCK.radius,
								y: 1,
								z: 2.5
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (13 == e) {
							v = c;
							this.geometry = v;
							var C = new r.MeshLambertMaterial({
									map: a.loader.load("res/money.png")
								}),
								T = new r.PlaneGeometry(3, 3),
								o = [C],
								s = new r.Geometry;
							this.mapUv(64, 64, v, 1, 2, 2, 4, 4), this.mapUv(64, 64, v, 2, 2, 2, 4, 4), this.mapUv(64, 64, v, 4, 2, 2, 4, 4), this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.merge(s, T, 0, [{
								x: 0,
								y: 0,
								z: a.BLOCK.radius + .01
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (14 == e) {
							v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius);
							this.geometry = v;
							P = new r.MeshLambertMaterial({
								map: a.loader.load("res/tit.png")
							});
							this.mapUv(310, 310, v, 1, 0, 0, 200, 110), this.mapUv(310, 310, v, 2, 0, 110, 200, 310), this.mapUv(310, 310, v, 4, 200, 110, 310, 310), this.hitObj = new r.Mesh(v, P)
						} else if (15 == e) {
							v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius);
							this.map = a.loader.load("res/bag.png");
							P = new r.MeshLambertMaterial({
								map: this.map
							});
							this.glowMap = a.loader.load("res/glow_bag.png"), this.hitObj = new r.Mesh(v, P)
						} else if (16 == e) {
							var v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius),
								P = new r.MeshLambertMaterial({
									map: a.loader.load("res/dict.png")
								});
							this.mapUv(428, 428, v, 1, 0, 148, 280, 0), this.mapUv(428, 428, v, 2, 0, 148, 280, 428), this.mapUv(428, 428, v, 4, 280, 148, 428, 428), this.hitObj = new r.Mesh(v, P)
						} else if (17 == e) {
							this.height /= 3;
							var k = new r.MeshLambertMaterial({
									map: a.loader.load("res/box_top.png")
								}),
								A = new r.MeshLambertMaterial({
									map: a.loader.load("res/box_bottom.png")
								}),
								v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius);
							this.geometry = v;
							var L = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius),
								o = [k, A],
								s = new r.Geometry;
							this.mapUv(198, 198, v, 1, 0, 0, 148, 50), this.mapUv(198, 198, v, 2, 0, 50, 148, 198), this.mapUv(198, 198, v, 4, 148, 50, 198, 198), this.mapUv(444, 50, L, 4, 148, 0, 296, 50, !0), this.mapUv(444, 50, L, 1, 0, 0, 148, 50), this.mapUv(444, 50, L, 2, 0, 0, 1, 1), this.mapUv(444, 50, L, 0, 296, 50, 444, 0), this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.merge(s, L, 1, [{
								x: 0,
								y: -2 * this.height,
								z: 0
							}]);
							var R = new r.MeshLambertMaterial({
								map: a.loader.load("res/box_middle.png")
							});
							this.middle = new r.Mesh(L, R), this.middle.position.y = -this.height, this.body.add(this.middle), this.hitObj = new r.Mesh(s, o)
						} else if (18 == e) {
							var v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius),
								P = new r.MeshLambertMaterial({
									map: a.loader.load("res/express.png")
								});
							this.mapUv(428, 428, v, 1, 0, 0, 280, 148), this.mapUv(428, 428, v, 2, 0, 148, 280, 428), this.mapUv(428, 428, v, 4, 280, 148, 428, 428), this.hitObj = new r.Mesh(v, P)
						} else if (19 == e) {
							this.min = .9, this.height = a.BLOCK.height / 21 * 4;
							v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height + .1, 2 * a.BLOCK.radius);
							this.geometry = v;
							var P = new r.MeshLambertMaterial({
									color: 16777215,
									transparent: !0,
									opacity: .3
								}),
								b = new r.BoxGeometry(2.05 * a.BLOCK.radius, a.BLOCK.height / 21 * 17, 2.05 * a.BLOCK.radius),
								o = [P, A = new r.MeshBasicMaterial({
									map: a.loader.load("res/sing.png")
								})],
								s = new r.Geometry;
							this.mapUv(416, 416, b, 1, 0, 0, 256, 160), this.mapUv(416, 416, b, 2, 0, 160, 256, 416), this.mapUv(416, 416, b, 4, 256, 160, 416, 416), this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.merge(s, b, 1, [{
								x: 0,
								y: -a.BLOCK.height / 21 * 10.5,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o), this.record = new r.Object3D, this.record.add(new r.Mesh(new r.CylinderGeometry(.9 * a.BLOCK.radius, .9 * a.BLOCK.radius, .4, 50), new r.MeshBasicMaterial({
								color: 2894892
							})));
							var T = new r.CircleGeometry(.9 * a.BLOCK.radius, 40),
								C = new r.MeshBasicMaterial({
									map: a.loader.load("res/record.png")
								});
							(et = new r.Mesh(T, C)).rotation.x = -Math.PI / 2, et.position.y = .26, this.record.add(et), this.body.add(this.record);
							T = new r.PlaneGeometry(2, 2);
							this.musicIcon = new r.Mesh(T, new r.MeshBasicMaterial({
								map: a.loader.load("res/music_icon.png"),
								transparent: !0
							})), this.musicIcon.position.set(0, 0, 0), this.musicIcon.rotation.y = -Math.PI / 4, this.musicIcon.rotation.x = -Math.PI / 5, this.musicIcon.rotation.z = -Math.PI / 5, this.musicIcon.visible = !1, this.secondMusicIcon = new r.Mesh(T, new r.MeshBasicMaterial({
								map: a.loader.load("res/music_icon_two.png"),
								transparent: !0
							})), this.secondMusicIcon.rotation.y = -Math.PI / 4, this.secondMusicIcon.rotation.x = -Math.PI / 5, this.secondMusicIcon.rotation.z = -Math.PI / 5, this.secondMusicIcon.visible = !1, this.icons = [], this.icons.push(this.musicIcon, this.secondMusicIcon);
							for (N = 0; N < 2; ++N) this.body.add(this.icons[N])
						} else if (20 == e) {
							v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius / 38 * 48);
							this.geometry = v, this.shadow.scale.set(1, 61 / 38, 48 / 38);
							var P = new r.MeshLambertMaterial({
									map: a.loader.load("res/disk.png")
								}),
								O = new r.MeshBasicMaterial({
									map: a.loader.load("res/disk_dark.png"),
									transparent: !0
								}),
								T = new r.PlaneGeometry(3, 3),
								o = [O, P],
								s = new r.Geometry;
							this.mapUv(236, 300, v, 1, 0, 250, 10, 260), this.mapUv(236, 300, v, 2, 0, 300, 236, 0), this.mapUv(236, 300, v, 4, 0, 250, 10, 260), this.merge(s, v, 1, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.merge(s, T, 0, [{
								x: 3.5,
								y: .5,
								z: a.BLOCK.radius / 38 * 48 + .01
							}]), this.hitObj = new r.Mesh(s, o), this.plane = new r.Mesh(T, new r.MeshBasicMaterial({
								map: a.loader.load("res/disk_light.png"),
								transparent: !0
							})), this.plane.position.set(3.5, .5, a.BLOCK.radius / 38 * 48 + .03), this.plane.updateMatrix(), this.plane.matrixAutoUpdate = !1, this.body.add(this.plane), this.timer = setInterval(function () {
								n.plane.visible = !n.plane.visible
							}, 1e3)
						} else if (21 == e) {
							this.radiusSegments = 50, this.min = .8, this.height = a.BLOCK.height / 21 * 4;
							v = new r.CylinderGeometry(.7 * a.BLOCK.radius, .8 * a.BLOCK.radius, this.height, 50);
							this.geometry = v;
							var T = new r.CircleGeometry(.7 * a.BLOCK.radius, 50),
								b = new r.CylinderGeometry(.7 * a.BLOCK.radius, .5 * a.BLOCK.radius, a.BLOCK.height / 21 * 17, 50),
								P = new r.MeshBasicMaterial({
									color: 5066061
								}),
								C = new r.MeshLambertMaterial({
									map: a.loader.load("res/westore_desk.png")
								}),
								A = new r.MeshBasicMaterial({
									map: a.loader.load("res/westore.png")
								});
							this.shadow.scale.set(.55, .9, .7);
							var o = [P, A, C],
								s = new r.Geometry;
							this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), b.rotateY(2.3), this.merge(s, b, 1, [{
								x: 0,
								y: -a.BLOCK.height / 21 * 10.5,
								z: 0
							}]), T.rotateX(-Math.PI / 2), T.rotateY(-.7), this.merge(s, T, 2, [{
								x: 0,
								y: this.height / 2 + .01,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (22 == e) {
							this.height = a.BLOCK.height / 21 * 6;
							v = new r.BoxGeometry(2.1 * a.BLOCK.radius, this.height, 2.1 * a.BLOCK.radius);
							this.geometry = v;
							var P = new r.MeshLambertMaterial({
									map: a.loader.load("res/gift.png")
								}),
								b = new r.BoxGeometry(2 * a.BLOCK.radius, a.BLOCK.height / 21 * 15, 2 * a.BLOCK.radius),
								A = new r.MeshLambertMaterial({
									color: 11637749
								});
							this.mapUv(300, 370, v, 1, 0, 0, 300, 70), this.mapUv(300, 370, v, 2, 0, 70, 300, 370), this.mapUv(300, 370, v, 4, 0, 0, 300, 70, !0);
							var o = [P, A],
								s = new r.Geometry;
							this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.merge(s, b, 1, [{
								x: 0,
								y: -a.BLOCK.height / 21 * 10.5,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o)
						} else if (23 == e) {
							this.height = a.BLOCK.height / 21 * 5;
							var v = new r.Geometry,
								I = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius / 38 * 40);
							v.merge(I), this.shadow.scale.set(1, 48 / 38, 48 / 38);
							var B = new r.BoxGeometry(1.5, 3.5, 1.5);
							B.rotateZ(-.3), B.vertices[7].y -= .4, B.vertices[6].y -= .4, B.translate(-4, -3, -3.5), v.merge(B), B.vertices[6].y += .5, B.translate(0, 0, 7), B.rotateX(-.2), v.merge(B), B.vertices[7].y += .4, B.translate(5, -1, 0), B.rotateZ(.4), v.merge(B);
							P = new r.MeshLambertMaterial({
								map: a.loader.load("res/stool.png")
							});
							this.hitObj = new r.Mesh(v, P), this.shadow = new r.Mesh(new r.PlaneGeometry(this.shadowWidth, this.shadowWidth), new r.MeshBasicMaterial({
								map: a.loader.load("res/stool_shadow.png"),
								transparent: !0,
								alphaTest: .01
							})), this.shadow.position.set(-.76, -a.BLOCK.height / 2 - .001 * e, -3.6), this.shadow.scale.y = 1.4, this.shadow.scale.x = .9, this.shadow.rotation.x = -Math.PI / 2
						} else if (24 == e) {
							this.height = a.BLOCK.height / 21 * 6;
							v = new r.BoxGeometry(2 * a.BLOCK.radius / 38 * 45, this.height, 2 * a.BLOCK.radius / 38 * 45);
							this.geometry = v;
							b = new r.BoxGeometry(2 * a.BLOCK.radius / 38 * 40, a.BLOCK.height / 21 * 15, 2 * a.BLOCK.radius / 38 * 40);
							this.shadow.scale.set(40 / 38, 1.4, 1);
							var o = [P = new r.MeshLambertMaterial({
									map: a.loader.load("res/store_top.png")
								}), A = new r.MeshBasicMaterial({
									map: a.loader.load("res/store_bottom.png"),
									transparent: !0
								}), C = new r.MeshBasicMaterial({
									map: a.loader.load("res/indoor.png"),
									transparent: !0
								})],
								T = new r.PlaneGeometry(3.1, 3.1),
								s = new r.Geometry;
							this.mapUv(340, 340, v, 1, 0, 0, 280, 60), this.mapUv(340, 340, v, 2, 0, 60, 280, 340), this.mapUv(340, 340, v, 4, 280, 60, 340, 340), this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), this.mapUv(434, 164, b, 1, 0, 0, 217, 164), this.mapUv(434, 164, b, 4, 217, 0, 434, 164, !0), this.merge(s, b, 1, [{
								x: 0,
								y: -a.BLOCK.height / 21 * 10.5,
								z: 0
							}]), T.rotateY(-Math.PI / 2), this.merge(s, T, 2, [{
								x: -a.BLOCK.radius / 38 * 40 - .01,
								y: -3.3,
								z: -2.5
							}]), this.hitObj = new r.Mesh(s, o);
							var U = new r.PlaneGeometry(1.55, 3.1);
							this.door = new r.Mesh(U, new r.MeshBasicMaterial({
								map: a.loader.load("res/door.png"),
								transparent: !0
							})), this.door.rotation.y = -Math.PI / 2, this.door.position.set(-a.BLOCK.radius / 38 * 40 - .02, -3.3, -3.3), this.body.add(this.door), this.secondDoor = new r.Mesh(U, new r.MeshBasicMaterial({
								map: a.loader.load("res/second_door.png"),
								transparent: !0
							})), this.secondDoor.rotation.y = -Math.PI / 2, this.secondDoor.position.set(-a.BLOCK.radius / 38 * 40 - .02, -3.3, -1.7), this.body.add(this.secondDoor)
						} else if (25 == e) {
							v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius);
							this.geometry = v;
							P = new r.MeshLambertMaterial({
								map: a.loader.load("res/clock.png")
							});
							this.mapUv(320, 200, v, 1, 0, 0, 5, 5), this.mapUv(320, 200, v, 2, 0, 0, 5, 5), this.mapUv(320, 200, v, 4, 0, 200, 320, 0, !0);
							var D = new r.MeshBasicMaterial({
									map: a.loader.load("res/stripe.png")
								}),
								z = new r.CylinderGeometry(1, 1, 1, 30),
								o = [P, D],
								s = new r.Geometry;
							this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), z.rotateZ(Math.PI / 2), this.merge(s, z, 1, [{
								x: -a.BLOCK.radius - .5,
								y: 0,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o), this.plane = new r.Mesh(new r.PlaneGeometry(3, 3), new r.MeshBasicMaterial({
								map: a.loader.load("res/point.png"),
								transparent: !0
							})), this.plane.position.set(0, 0, a.BLOCK.radius + .04), this.body.add(this.plane), this.timer = setInterval(function () {
								n.plane.visible = !n.plane.visible
							}, 1e3), this.numbers = [];
							for (var j = new r.PlaneGeometry(3, 3), N = 0; N < 10; ++N) {
								for (var F = new r.MeshBasicMaterial({
										map: a.loader.load("res/" + N + ".png"),
										alphaTest: .5
									}), G = [], H = 0; H < 4; ++H) {
									var V = new r.Mesh(j, F);
									V.position.z = a.BLOCK.radius + .01, V.visible = !1, G.push(V), this.body.add(V)
								}
								this.numbers.push(G)
							}
							var W = new Date,
								q = ("0" + W.getHours()).slice(-2),
								X = ("0" + W.getMinutes()).slice(-2);
							this.numbers[q[0]][0].position.x = -3.2 * this.radiusScale, this.numbers[q[0]][0].visible = !0, this.numbers[q[1]][1].position.x = -1.3 * this.radiusScale, this.numbers[q[1]][1].visible = !0, this.numbers[X[0]][2].position.x = 1.3 * this.radiusScale, this.numbers[X[0]][2].visible = !0, this.numbers[X[1]][3].position.x = 3.2 * this.radiusScale, this.numbers[X[1]][3].visible = !0
						} else if (26 == e) {
							var v = new r.BoxGeometry(2 * a.BLOCK.radius, this.height, 2 * a.BLOCK.radius),
								P = new r.MeshLambertMaterial({
									map: a.loader.load("res/well.png")
								});
							this.mapUv(280, 428, v, 1, 0, 0, 280, 148), this.mapUv(280, 428, v, 2, 0, 148, 280, 428), this.mapUv(280, 428, v, 4, 0, 0, 280, 148, !0), this.hitObj = new r.Mesh(v, P)
						} else if (27 == e) {
							this.radiusSegments = 50;
							v = new r.CylinderGeometry(2 * a.BLOCK.radius / 38 * 25, 2 * a.BLOCK.radius / 38 * 25, this.height, 50);
							this.geometry = v, this.shadow.scale.set(50 / 38, 50 / 38, 50 / 38);
							var P = new r.MeshBasicMaterial({
									map: a.loader.load("res/golf_bottom.png")
								}),
								T = new r.CircleGeometry(2 * a.BLOCK.radius / 38 * 25 + .01, 30),
								C = new d({
									map: a.loader.load("res/golf_top.png")
								}),
								s = new r.Geometry,
								o = [P, C];
							v.rotateY(3), this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), T.rotateX(-Math.PI / 2), T.rotateY(-.7), this.merge(s, T, 1, [{
								x: 0,
								y: this.height / 2 + .01,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o), this.sphere = new r.Mesh(new r.SphereGeometry(.6, 10, 10), this.whiteMaterial), this.sphere.position.set(-8, -1, -1.5), this.obj.add(this.sphere)
						} else if (28 == e) {
							this.radiusSegments = 50;
							v = new r.CylinderGeometry(2 * a.BLOCK.radius / 38 * 15, 2 * a.BLOCK.radius / 38 * 15, this.height, 50);
							this.geometry = v, this.shadow.scale.set(30 / 38, 30 / 38, 30 / 38);
							var P = new r.MeshBasicMaterial({
									map: a.loader.load("res/paper_bottom.png")
								}),
								T = new r.CircleGeometry(2 * a.BLOCK.radius / 38 * 15 + .01, 30),
								C = new d({
									map: a.loader.load("res/paper_top.png")
								}),
								s = new r.Geometry,
								o = [P, C];
							v.rotateY(4), this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), T.rotateX(-Math.PI / 2), T.rotateY(-.7), this.merge(s, T, 1, [{
								x: 0,
								y: this.height / 2 + .01,
								z: 0
							}]), this.shadow.scale.y = 1.1, this.hitObj = new r.Mesh(s, o)
						} else if (29 == e) {
							this.radiusSegments = 50, this.min = .8, this.height = a.BLOCK.height / 21 * 4;
							v = new r.CylinderGeometry(.4 * a.BLOCK.radius, .4 * a.BLOCK.radius, this.height, 50);
							this.geometry = v;
							var P = new r.MeshBasicMaterial({
									map: a.loader.load("res/stripe.png")
								}),
								T = new r.CircleGeometry(.4 * a.BLOCK.radius, 50),
								C = new r.MeshBasicMaterial({
									color: 16777215
								}),
								L = new r.CylinderGeometry(.4 * a.BLOCK.radius, .5 * a.BLOCK.radius, a.BLOCK.height / 21 * 1, 50),
								b = new r.CylinderGeometry(.5 * a.BLOCK.radius, .5 * a.BLOCK.radius, a.BLOCK.height / 21 * 16, 50),
								A = new r.MeshBasicMaterial({
									map: a.loader.load("res/medicine.png")
								}),
								s = new r.Geometry,
								o = [P, C, A];
							this.merge(s, v, 0, [{
								x: 0,
								y: 0,
								z: 0
							}]), T.rotateX(-Math.PI / 2), this.merge(s, T, 1, [{
								x: 0,
								y: this.height / 2 + .01,
								z: 0
							}]), this.merge(s, L, 1, [{
								x: 0,
								y: -a.BLOCK.height / 21 * 2.5,
								z: 0
							}]), b.rotateY(2.3), this.merge(s, b, 2, [{
								x: 0,
								y: -a.BLOCK.height / 21 * 11,
								z: 0
							}]), this.hitObj = new r.Mesh(s, o), this.shadow.scale.set(.55, .9, .7)
						} else if (-1 == e) {
							var K = [15622240, 14980702, 15712087, 9089870, 7451844, 6519997, 10772948],
								v = l,
								P = new r.MeshLambertMaterial({
									color: K[i],
									transparent: !0
								});
							this.hitObj = new r.Mesh(v, P);
							var Y = new r.BoxGeometry(2 * a.BLOCK.radius, a.BLOCK.height, 2 * a.BLOCK.radius);
							this.mapUv(100, 88, Y, 2, 0, 0, 5, 5);
							var Z = new r.Mesh(Y, a.grayMaterial);
							0 == i && (Z.receiveShadow = !0), this.body.add(Z);
							var J, Q, $, tt, T = new r.PlaneGeometry(4, 8);
							$ = (J = i % 4 * 64) + 64, tt = (Q = 128 * parseInt(i / 4)) + 128, this.mapUv(256, 256, T, 0, J, tt, $, Q);
							var et = new r.Mesh(T, a.numberMaterial);
							et.rotation.x = -Math.PI / 2, et.rotation.z = -Math.PI / 2, et.position.y = a.BLOCK.height / 2 + .05, this.body.add(et), this.obj.scale.set(.7, 1, .7)
						}
						this.shadow.initZ = this.shadow.position.z, this.hitObj.receiveShadow = !0, this.hitObj.name = "hitObj", this.body.add(this.hitObj), this.hitObj.matrixAutoUpdate = !1, this.shadow.initScale = this.shadow.scale.y, this.body.position.y = a.BLOCK.height / 2 - this.height / 2, this.obj.add(this.shadow), this.obj.add(this.body)
					}
					return n(t, [{
						key: "merge",
						value: function (t, e, i, n) {
							for (var a = 0, o = e.faces.length; a < o; ++a) e.faces[a].materialIndex = 0;
							for (var s = new r.Mesh(e), a = 0, o = n.length; a < o; ++a) s.position.set(n[a].x, n[a].y, n[a].z), s.updateMatrix(), t.merge(s.geometry, s.matrix, i)
						}
					}, {
						key: "mapUv",
						value: function (t, e, i, n, a, o, s, h, l) {
							var c = 1 / t,
								u = 1 / e;
							if (i.faces[n] instanceof r.Face3) {
								d = i.faceVertexUvs[0][2 * n];
								4 != n || l ? (d[0].x = a * c, d[0].y = o * u, d[1].x = a * c, d[1].y = h * u, d[2].x = s * c, d[2].y = o * u) : (d[0].x = a * c, d[0].y = o * u, d[2].x = a * c, d[2].y = h * u, d[1].x = s * c, d[1].y = o * u);
								var d = i.faceVertexUvs[0][2 * n + 1];
								4 != n || l ? (d[0].x = a * c, d[0].y = h * u, d[1].x = s * c, d[1].y = h * u, d[2].x = s * c, d[2].y = o * u) : (d[2].x = a * c, d[2].y = h * u, d[1].x = s * c, d[1].y = h * u, d[0].x = s * c, d[0].y = o * u)
							}
						}
					}, {
						key: "getBox",
						value: function () {
							return this.boundingBox ? this.boundingBox : (this.boundingBox = (new r.Box3).setFromObject(this.body), this.boundingBox)
						}
					}, {
						key: "glow",
						value: function () {
							this.hitObj.material.map = this.glowMap
						}
					}, {
						key: "openDoor",
						value: function () {
							o.customAnimation.to(this.door.position, 1, {
								z: -4.5
							}), o.customAnimation.to(this.secondDoor.position, 1, {
								z: -.5
							})
						}
					}, {
						key: "closeDoor",
						value: function () {
							o.customAnimation.to(this.door.position, 1, {
								z: -3.3
							}), o.customAnimation.to(this.secondDoor.position, 1, {
								z: -1.7
							})
						}
					}, {
						key: "rotateBox",
						value: function () {
							o.customAnimation.to(this.middle.rotation, .5, {
								y: -Math.PI / 2
							})
						}
					}, {
						key: "playMusic",
						value: function () {
							for (var t = this, e = 0; e < 2; ++e) setTimeout(function (t) {
								return function () {
									t.visible = !0, t.position.set(0, 0, 0), t.material.opacity = 1, o.customAnimation.to(t.position, 2, {
										x: 5 * (1 - 2 * Math.random()),
										y: 15,
										z: 5 * (1 - 2 * Math.random())
									}), o.customAnimation.to(t.material, 2, {
										opacity: 0
									})
								}
							}(this.icons[e]), 1e3 * e);
							this.musicTimer = setTimeout(function () {
								t.playMusic()
							}, 2500)
						}
					}, {
						key: "stopMusic",
						value: function () {
							this.musicTimer && (clearTimeout(this.musicTimer), this.musicTimer = null)
						}
					}, {
						key: "change",
						value: function (t, e, i) {
							if (this.canChange) {
								if (this.order >= 9) {
									var n = this.order >= 13 ? .7 : .6;
									return this.radiusScale = i || Math.max((0, s.random)() * (a.BLOCK.maxRadiusScale - a.BLOCK.minRadiusScale) + a.BLOCK.minRadiusScale, this.min || n), this.radius = t || this.radiusScale * a.BLOCK.radius, this.obj.scale.set(this.radiusScale, 1, this.radiusScale), void(27 == this.order && (this.sphere.scale.set(1 / this.radiusScale, 1, 1 / this.radiusScale), this.sphere.updateMatrix()))
								}
								this.radiusScale = i || (0, s.random)() * (a.BLOCK.maxRadiusScale - a.BLOCK.minRadiusScale) + a.BLOCK.minRadiusScale, this.radius = t || this.radiusScale * a.BLOCK.radius, this.obj.scale.set(this.radiusScale, 1, this.radiusScale), this.changeColor(e)
							}
						}
					}, {
						key: "changeColor",
						value: function (t) {
							var e = t || this.types[Math.floor(3 * Math.random())];
							this.type != e && (this.type = e, "green" == e ? (this.greenMaterial.color.setHex(h.green), this.whiteMaterial.color.setHex(h.white), this.middleLightGreenMaterial && this.middleLightGreenMaterial.color.setHex(h.middleLightGreen)) : "gray" == e ? (this.greenMaterial.color.setHex(h.white), this.whiteMaterial.color.setHex(h.gray), this.middleLightGreenMaterial && this.middleLightGreenMaterial.color.setHex(h.middleLightGray)) : "black" == e && (this.greenMaterial.color.setHex(h.black), this.whiteMaterial.color.setHex(h.lightBlack), this.middleLightGreenMaterial && this.middleLightGreenMaterial.color.setHex(h.middleLightBlack)))
						}
					}, {
						key: "getVertices",
						value: function () {
							var t = this,
								e = [],
								i = this.geometry || this.hitObj.geometry;
							if (4 === this.radiusSegments)[0, 1, 4, 5].forEach(function (n) {
								var r = i.vertices[n].clone().applyMatrix4(t.hitObj.matrixWorld);
								e.push([r.x, r.z])
							});
							else
								for (var n = 0; n < this.radiusSegments; ++n) {
									var r = i.vertices[n].clone().applyMatrix4(this.hitObj.matrixWorld);
									e.push([r.x, r.z])
								}
							return e
						}
					}, {
						key: "shrink",
						value: function () {
							this.status = "shrink"
						}
					}, {
						key: "_shrink",
						value: function () {
							if (this.scale -= a.BLOCK.reduction, this.scale = Math.max(a.BLOCK.minScale, this.scale), this.scale <= a.BLOCK.minScale) this.status = "stop";
							else {
								this.body.scale.y = this.scale, this.shadow.scale.y -= a.BLOCK.reduction / 2, this.shadow.position.z += a.BLOCK.reduction / 4 * this.shadowWidth;
								var t = a.BLOCK.reduction / 2 * a.BLOCK.height * (a.BLOCK.height - this.height / 2) / a.BLOCK.height * 2;
								this.body.position.y -= t
							}
						}
					}, {
						key: "showup",
						value: function (t) {
							var e = this.shadow.position.z;
							this.body.position.set(0, 20, 0), this.shadow.position.z = -15, this.obj.visible = !0, 3 == t || 4 == t || 6 == t ? this.obj.position.set(7.5 * (6 == t ? 5 : 3), 0, 3.8 * (3 == t || 6 == t ? -1 : 1)) : 5 == t ? this.obj.position.set(30, 0, 0) : this.obj.position.set(7.5 * t, 0, 0), (0, o.TweenAnimation)(this.body.position.y, a.BLOCK.height / 2 - this.height / 2, 500, "Bounce.easeOut", function (t, e) {
								this.body.position.y = t
							}.bind(this)), (0, o.TweenAnimation)(this.shadow.position.z, e, 500, "Bounce.easeOut", function (t, e) {
								this.shadow.position.z = t
							}.bind(this))
						}
					}, {
						key: "hideGlow",
						value: function () {
							this.hitObj.material.map = this.map
						}
					}, {
						key: "popup",
						value: function () {
							if (15 == this.order) this.hideGlow();
							else if (25 == this.order) {
								for (var t = 0; t < 10; ++t)
									for (var e = 0; e < 4; ++e) this.numbers[t][e].visible = !1;
								var i = new Date,
									n = ("0" + i.getHours()).slice(-2),
									r = ("0" + i.getMinutes()).slice(-2);
								this.numbers[n[0]][0].position.x = -3.1 * this.radiusScale, this.numbers[n[0]][0].visible = !0, this.numbers[n[1]][1].position.x = -1.2 * this.radiusScale, this.numbers[n[1]][1].visible = !0, this.numbers[r[0]][2].position.x = 1.2 * this.radiusScale, this.numbers[r[0]][2].visible = !0, this.numbers[r[1]][3].position.x = 3.1 * this.radiusScale, this.numbers[r[1]][3].visible = !0
							} else 17 == this.order && (this.middle.rotation.y = 0);
							var s = this.shadow.position.z;
							this.body.position.y = 20, this.shadow.position.z = -15, this.obj.visible = !0, this.boundingBox = null, o.customAnimation.to(this.body.position, .5, {
								y: a.BLOCK.height / 2 - this.height / 2,
								ease: "Bounce.easeOut"
							}), o.customAnimation.to(this.shadow.position, .5, {
								z: s,
								ease: "Bounce.easeOut"
							})
						}
					}, {
						key: "reset",
						value: function () {
							this.status = "stop", this.scale = 1, this.obj.scale.y = 1, this.obj.position.y = 0, this.body.position.y = a.BLOCK.height / 2 - this.height / 2, this.shadow.scale.y = this.shadow.initScale, this.shadow.position.z = this.shadow.initZ, this.boundingBox = null
						}
					}, {
						key: "rebound",
						value: function () {
							this.status = "stop", this.scale = 1, o.customAnimation.to(this.body.scale, .5, {
								ease: "Elastic.easeOut",
								y: 1
							}), o.customAnimation.to(this.body.position, .5, {
								ease: "Elastic.easeOut",
								y: a.BLOCK.height / 2 - this.height / 2
							}), o.customAnimation.to(this.shadow.scale, .5, {
								ease: "Elastic.easeOut",
								y: this.shadow.initScale
							}), o.customAnimation.to(this.shadow.position, .5, {
								ease: "Elastic.easeOut",
								z: this.shadow.initZ
							})
						}
					}, {
						key: "update",
						value: function () {
							19 == this.order && (this.record.rotation.y += .01), "stop" !== this.status && ("shrink" === this.status ? this._shrink() : this.status)
						}
					}]), t
				}();
			e.default = f
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				a = i(3),
				o = i(1),
				s = function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(7)),
				h = function () {
					function t() {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.obj = new r.Object3D, this.obj.name = "bottle", this.trail = null, this.bottle = new r.Object3D;
						var e = new r.MeshBasicMaterial({
							map: o.loader.load("res/head.png")
						});
						this.human = new r.Object3D, this.head = new r.Mesh(new r.SphereGeometry(2.1 * .45, 20, 20), e), this.head.castShadow = !0, this.bottom = new r.Mesh(new r.CylinderGeometry(.8316, 1.20015, 2.1 * .45 * 2.68, 20), new r.MeshBasicMaterial({
							map: o.loader.load("res/bottom.png")
						})), this.bottom.rotation.y = 4.7, this.bottom.castShadow = !0;
						var i = new r.CylinderGeometry(2.1 * .45, .8316, 2.1 * .45 * 1.2, 20),
							n = [new r.MeshBasicMaterial({
								map: o.loader.load("res/top.png")
							}), e],
							a = new r.Geometry;
						i.rotateY(4.7), this.merge(a, i, 0, [{
							x: 0,
							y: this.bottom.position.y + 2.1 * .45 * 1.94,
							z: 0
						}]);
						var h = new r.SphereGeometry(2.1 * .45, 20, 20);
						h.scale(1, .54, 1), this.merge(a, h, 1, [{
							x: 0,
							y: this.bottom.position.y + 2.4003,
							z: 0
						}]), this.middle = new r.Mesh(a, n), this.middle.castShadow = !0, this.body = new r.Object3D, this.body.add(this.bottom), this.body.add(this.middle), this.human.add(this.body), this.head.position.y = 4.725, this.human.add(this.head), this.bottle.add(this.human), this.bottle.position.y = o.BOTTLE.bodyHeight / 2 - .25, this.obj.add(this.bottle), this.status = "stop", this.scale = 1, this.double = 1, this.velocity = {}, this.flyingTime = 0, this.direction = "straight", this.jumpStatus = "init", this.particles = [];
						for (var l = new r.MeshBasicMaterial({
								map: o.loader.load("res/white.png"),
								alphaTest: .5
							}), c = new r.MeshBasicMaterial({
								map: o.loader.load("res/green.png"),
								alphaTest: .5
							}), u = new r.PlaneGeometry(1, 1), d = 0; d < 15; ++d) {
							(f = new r.Mesh(u, l)).rotation.y = -Math.PI / 4, f.rotation.x = -Math.PI / 5, f.rotation.z = -Math.PI / 5, this.particles.push(f), this.obj.add(f)
						}
						for (d = 0; d < 5; ++d) {
							var f = new r.Mesh(u, c);
							f.rotation.y = -Math.PI / 4, f.rotation.x = -Math.PI / 5, f.rotation.z = -Math.PI / 5, this.particles.push(f), this.obj.add(f)
						}
						this.scoreText = new s.default("0", {
							fillStyle: 2434341,
							textAlign: "center",
							plusScore: !0
						}), this.scoreText.obj.visible = !1, this.scoreText.obj.rotation.y = -Math.PI / 4, this.scoreText.obj.scale.set(.5, .5, .5), this.obj.add(this.scoreText.obj)
					}
					return n(t, [{
						key: "merge",
						value: function (t, e, i, n) {
							for (var a = 0, o = e.faces.length; a < o; ++a) e.faces[a].materialIndex = 0;
							for (var s = new r.Mesh(e), a = 0, o = n.length; a < o; ++a) s.position.set(n[a].x, n[a].y, n[a].z), s.updateMatrix(), t.merge(s.geometry, s.matrix, i)
						}
					}, {
						key: "showAddScore",
						value: function (t, e, i) {
							e ? 1 === this.double ? this.double = 2 : this.double += 2 : this.double = 1, i && this.double <= 2 && (this.double *= 2), this.double = Math.min(32, this.double), t *= this.double, this.scoreText.setScore(t.toString()), this.scoreText.obj.visible = !0, this.scoreText.obj.position.y = 3, this.scoreText.material.opacity = 1, (0, a.TweenAnimation)(this.scoreText.obj.position.y, o.BOTTLE.bodyHeight + 6, 700, function (t) {
								this.scoreText.obj.position.y = t
							}.bind(this)), (0, a.TweenAnimation)(this.scoreText.material.opacity, 0, 700, function (t, e) {
								this.scoreText.material.opacity = t, e && (this.scoreText.obj.visible = !1)
							}.bind(this))
						}
					}, {
						key: "changeScorePos",
						value: function (t) {
							this.scoreText.obj.position.z = t
						}
					}, {
						key: "resetParticles",
						value: function () {
							this.gatherTimer && clearTimeout(this.gatherTimer), this.gatherTimer = null;
							for (var t = 0, e = this.particles.length; t < e; ++t) this.particles[t].gathering = !1, this.particles[t].visible = !1, this.particles[t].scattering = !1
						}
					}, {
						key: "scatterParticles",
						value: function () {
							for (var t = 0; t < 10; ++t) this.particles[t].scattering = !0, this.particles[t].gathering = !1, this._scatterParticles(this.particles[t])
						}
					}, {
						key: "_scatterParticles",
						value: function (t) {
							var e = o.BOTTLE.bodyWidth / 2,
								i = (e + Math.random() * (2 - e)) * (1 - 2 * Math.random()),
								n = (e + Math.random() * (2 - e)) * (1 - 2 * Math.random());
							t.scale.set(1, 1, 1), t.visible = !1, t.position.x = i, t.position.y = -.5, t.position.z = n, setTimeout(function (t) {
								return function () {
									if (t.scattering) {
										t.visible = !0;
										var e = .3 + .2 * Math.random();
										a.customAnimation.to(t.scale, e, {
											x: .2,
											y: .2,
											z: .2
										}), a.customAnimation.to(t.position, e, {
											x: 2 * i,
											y: 2.5 * Math.random() + 2,
											z: 2 * n,
											onComplete: function () {
												t.scattering = !1, t.visible = !1
											}
										})
									}
								}
							}(t), 0)
						}
					}, {
						key: "gatherParticles",
						value: function () {
							for (var t = this, e = 10; e < 20; ++e) this.particles[e].gathering = !0, this.particles[e].scattering = !1, this._gatherParticles(this.particles[e]);
							this.gatherTimer = setTimeout(function () {
								for (var e = 0; e < 10; ++e) t.particles[e].gathering = !0, t.particles[e].scattering = !1, t._gatherParticles(t.particles[e])
							}, 500 + 1e3 * Math.random())
						}
					}, {
						key: "_gatherParticles",
						value: function (t) {
							var e = this;
							t.scale.set(1, 1, 1), t.visible = !1;
							var i = Math.random() > .5 ? 1 : -1,
								n = Math.random() > .5 ? 1 : -1;
							t.position.x = (1 + 7 * Math.random()) * i, t.position.y = 1 + 7 * Math.random(), t.position.z = (1 + 7 * Math.random()) * n, setTimeout(function (t) {
								return function () {
									if (t.gathering) {
										t.visible = !0;
										var r = .5 + .4 * Math.random();
										(0, a.TweenAnimation)(t.scale.x, .8 + Math.random(), 1e3 * r, function (e) {
											t.scale.x = e
										}), (0, a.TweenAnimation)(t.scale.y, .8 + Math.random(), 1e3 * r, function (e) {
											t.scale.y = e
										}), (0, a.TweenAnimation)(t.scale.z, .8 + Math.random(), 1e3 * r, function (e) {
											t.scale.z = e
										}), (0, a.TweenAnimation)(t.position.x, Math.random() * i, 1e3 * r, function (e) {
											t.position.x = e
										}), (0, a.TweenAnimation)(t.position.y, 2.5 * Math.random(), 1e3 * r, function (e) {
											t.position.y = e
										}), (0, a.TweenAnimation)(t.position.z, Math.random() * n, 1e3 * r, function (i, n) {
											t.position.z = i, n && t.gathering && e._gatherParticles(t)
										})
									}
								}
							}(t), 500 * Math.random())
						}
					}, {
						key: "update",
						value: function (t) {
							"stop" != this.status && ("prepare" == this.status ? this._prepare() : "jump" == this.status ? this._jump(t) : "turn" == this.status && this.turn())
						}
					}, {
						key: "lookAt",
						value: function (t, e) {
							t !== this.direction && ("straight" === t ? (this.turnAngle = -Math.PI / 2, this.angle = 0) : (this.turnAngle = Math.PI / 2, this.angle = Math.PI / 2), this.direction = t)
						}
					}, {
						key: "turn",
						value: function () {
							var t = this.turnAngle > 0 ? .2 : -.2;
							this.bottle.rotation.y += t, this.turnAngle -= t, this.turnAngle >= -.2 && this.turnAngle <= .2 && (this.bottle.rotation.y = this.angle, this.status = "stop")
						}
					}, {
						key: "fall",
						value: function () {
							var t = this;
							this.stop(), setTimeout(function () {
								t.status = "fall", (0, a.TweenAnimation)(t.obj.position.y, -o.BLOCK.height / 2 - .3, 400, function (t) {
									this.obj.position.y = t
								}.bind(t))
							}, 0)
						}
					}, {
						key: "forerake",
						value: function () {
							var t = this;
							this.stop(), this.status = "forerake", setTimeout(function () {
								"straight" === t.direction ? (0, a.TweenAnimation)(t.obj.rotation.z, -Math.PI / 2, 1e3, function (t) {
									this.obj.rotation.z = t
								}.bind(t)) : (0, a.TweenAnimation)(t.obj.rotation.x, -Math.PI / 2, 1e3, function (t) {
									this.obj.rotation.x = t
								}.bind(t)), setTimeout(function () {
									"suspend" != t.status ? ((0, a.TweenAnimation)(t.obj.position.y, -o.BLOCK.height / 2 + 1.2, 400, function (t, e) {
										this.obj.position.y = t, e && (this.status = "stop")
									}.bind(t)), a.customAnimation.to(t.head.position, .2, {
										x: -1.125
									}), a.customAnimation.to(t.head.position, .2, {
										x: 0,
										delay: .2
									})) : t.status = "stop"
								}, 200)
							}, 200)
						}
					}, {
						key: "hypsokinesis",
						value: function () {
							var t = this;
							this.stop(), this.status = "hypsokinesis", setTimeout(function () {
								"straight" === t.direction ? (0, a.TweenAnimation)(t.obj.rotation.z, Math.PI / 2, 800, function (t) {
									this.obj.rotation.z = t
								}.bind(t)) : (0, a.TweenAnimation)(t.obj.rotation.x, Math.PI / 2, 800, function (t) {
									this.obj.rotation.x = t
								}.bind(t)), setTimeout(function () {
									"suspend" != t.status ? ((0, a.TweenAnimation)(t.obj.position.y, -o.BLOCK.height / 2 + 1.2, 400, function (t, e) {
										this.obj.position.y = t, e && (this.status = "stop")
									}.bind(t)), a.customAnimation.to(t.head.position, .2, {
										x: 1.125
									}), a.customAnimation.to(t.head.position, .2, {
										x: 0,
										delay: .2
									})) : t.status = "stop"
								}, 350)
							}, 200)
						}
					}, {
						key: "_jump",
						value: function (t) {
							var e = new r.Vector3(0, 0, 0);
							e.z = this.velocity.vz * t, e.y = this.velocity.vy * t - o.GAME.gravity / 2 * t * t - o.GAME.gravity * this.flyingTime * t, this.flyingTime += t, this.obj.translateY(e.y), this.obj.translateOnAxis(this.axis, e.z)
						}
					}, {
						key: "squeeze",
						value: function () {
							this.obj.position.y = o.BLOCK.height / 2, a.customAnimation.to(this.body.scale, .15, {
								y: .9,
								x: 1.07,
								z: 1.07
							}), a.customAnimation.to(this.body.scale, .15, {
								y: 1,
								x: 1,
								z: 1,
								delay: .15
							}), a.customAnimation.to(this.head.position, .15, {
								y: 4.725,
								delay: .15
							})
						}
					}, {
						key: "stop",
						value: function () {
							this.status = "stop", this.flyingTime = 0, this.scale = 1, this.velocity = {}, this.jumpStatus = "init"
						}
					}, {
						key: "suspend",
						value: function () {
							this.status = "suspend", a.TweenAnimation.killAll()
						}
					}, {
						key: "rotate",
						value: function () {
							if (a.TweenAnimation.killAll(), "straight" === this.direction) {
								(0, a.TweenAnimation)(this.obj.rotation.z, 0, 300, function (t) {
									this.obj.rotation.z = t
								}.bind(this));
								var t;
								t = this.status.indexOf("forerake") >= 0 ? 2 : -2, (0, a.TweenAnimation)(this.obj.position.x, this.obj.position.x + t, 300, function (t) {
									this.obj.position.x = t
								}.bind(this))
							} else(0, a.TweenAnimation)(this.obj.rotation.x, 0, 300, function (t) {
								this.obj.rotation.x = t
							}.bind(this)), t = this.status.indexOf("forerake") >= 0 ? -2 : 2, (0, a.TweenAnimation)(this.obj.position.z, this.obj.position.z + t, 300, function (t) {
								this.obj.position.z = t
							}.bind(this));
							(0, a.TweenAnimation)(this.head.position.x, 0, 100, function (t) {
								this.head.position.x = t
							}.bind(this)), (0, a.TweenAnimation)(this.obj.position.y, -o.BLOCK.height / 2, 300, function (t, e) {
								this.obj.position.y = t, e && (this.status = "stop")
							}.bind(this)), this.status = "rotate"
						}
					}, {
						key: "_prepare",
						value: function () {
							if (this.scale -= o.BOTTLE.reduction, this.scale = Math.max(o.BOTTLE.minScale, this.scale), !(this.scale <= o.BOTTLE.minScale)) {
								this.body.scale.y = this.scale, this.body.scale.x += .007, this.body.scale.z += .007, this.head.position.y -= .018;
								this.obj.position.y -= o.BLOCK.reduction / 2 * o.BLOCK.height / 2 + .027
							}
						}
					}, {
						key: "prepare",
						value: function () {
							this.status = "prepare", this.gatherParticles()
						}
					}, {
						key: "jump",
						value: function (t) {
							this.resetParticles(), this.status = "jump", this.axis = t, a.customAnimation.to(this.body.scale, .25, {
								x: 1,
								y: 1,
								z: 1
							}), this.head.position.y = 4.725, this.scale = 1;
							var e = Math.min(Math.max(this.velocity.vz / 35, 1.2), 1.4);
							this.human.rotation.z = this.human.rotation.x = 0, "straight" === this.direction ? (a.customAnimation.to(this.human.rotation, .12, {
								z: this.human.rotation.z - Math.PI
							}), a.customAnimation.to(this.human.rotation, .2, {
								z: this.human.rotation.z - 2 * Math.PI,
								delay: .12
							}), a.customAnimation.to(this.head.position, .1, {
								y: this.head.position.y + .9 * e,
								x: this.head.position.x + .45 * e
							}), a.customAnimation.to(this.head.position, .1, {
								y: this.head.position.y - .9 * e,
								x: this.head.position.x - .45 * e,
								delay: .1
							}), a.customAnimation.to(this.head.position, .15, {
								y: 4.725,
								x: 0,
								delay: .25
							}), a.customAnimation.to(this.body.scale, .1, {
								y: Math.max(e, 1),
								x: Math.max(Math.min(1 / e, 1), .7),
								z: Math.max(Math.min(1 / e, 1), .7)
							}), a.customAnimation.to(this.body.scale, .1, {
								y: Math.min(.9 / e, .7),
								x: Math.max(e, 1.2),
								z: Math.max(e, 1.2),
								delay: .1
							}), a.customAnimation.to(this.body.scale, .3, {
								y: 1,
								x: 1,
								z: 1,
								delay: .2
							})) : (a.customAnimation.to(this.human.rotation, .12, {
								x: this.human.rotation.x - Math.PI
							}), a.customAnimation.to(this.human.rotation, .2, {
								x: this.human.rotation.x - 2 * Math.PI,
								delay: .12
							}), a.customAnimation.to(this.head.position, .1, {
								y: this.head.position.y + .9 * e,
								z: this.head.position.z - .45 * e
							}), a.customAnimation.to(this.head.position, .1, {
								z: this.head.position.z + .45 * e,
								y: this.head.position.y - .9 * e,
								delay: .1
							}), a.customAnimation.to(this.head.position, .15, {
								y: 4.725,
								z: 0,
								delay: .25
							}), a.customAnimation.to(this.body.scale, .05, {
								y: Math.max(e, 1),
								x: Math.max(Math.min(1 / e, 1), .7),
								z: Math.max(Math.min(1 / e, 1), .7)
							}), a.customAnimation.to(this.body.scale, .05, {
								y: Math.min(.9 / e, .7),
								x: Math.max(e, 1.2),
								z: Math.max(e, 1.2),
								delay: .1
							}), a.customAnimation.to(this.body.scale, .2, {
								y: 1,
								x: 1,
								z: 1,
								delay: .2
							}))
						}
					}, {
						key: "showup",
						value: function () {
							this.status = "showup", this.obj.position.y = 25, this.human.rotation.x = this.human.rotation.z = 0, (0, a.TweenAnimation)(this.obj.position.y, o.BLOCK.height / 2, 500, "Bounce.easeOut", function (t, e) {
								this.obj.position.y = t, e && (this.status = "stop")
							}.bind(this))
						}
					}, {
						key: "stopPrepare",
						value: function () {
							this.obj.position.y = o.BLOCK.height / 2, this.stop(), this.body.scale.set(1, 1, 1), this.head.position.y = 4.725, this.head.position.x = 0, this.resetParticles()
						}
					}, {
						key: "getBox",
						value: function () {
							return [(new r.Box3).setFromObject(this.head), (new r.Box3).setFromObject(this.middle), (new r.Box3).setFromObject(this.bottom)]
						}
					}, {
						key: "reset",
						value: function () {
							this.stop(), this.obj.position.y = o.BLOCK.height / 2, this.obj.position.x = this.obj.position.z = 0, this.obj.rotation.z = 0, this.obj.rotation.y = 0, this.obj.rotation.x = 0, this.bottle.rotation.y = 0, this.bottle.rotation.z = 0, this.bottle.rotation.x = 0, this.body && this.head && (this.body.scale.set(1, 1, 1), this.body.rotation.z = 0, this.body.rotation.x = 0, this.head.position.y = 4.725, this.head.position.x = 0, this.human.rotation.z = this.human.rotation.x = 0), this.direction = "straight", this.jumpStatus = "init", this.double = 1, this.resetParticles(), this.scoreText.obj.visible = !1
						}
					}]), t
				}();
			e.default = h
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.commandList = [], this.isRunning = !1, this.icTimeout = null, this.cmdHandler = function () {}, this.gameId = 0, this.seq = 0
					}
					return n(t, [{
						key: "onReceiveCommand",
						value: function (t, e) {
							this.gameId != this.game.gameCtrl.modeCtrl.observeCtrl.gameId && (this.gameId = this.game.gameCtrl.modeCtrl.observeCtrl.gameId, this.seq = e - 1);
							var i = e - this.seq;
							if (1 != i) {
								var n;
								i > 1 && (n = 0), i < 1 && (n = 1), this.game.sendServerError(n), this.game.socketFirstSync = !0
							}
							this.seq = e, this.commandList.push(t), this.checkRunningState()
						}
					}, {
						key: "checkRunningState",
						value: function () {
							this.isRunning || this.runCommand()
						}
					}, {
						key: "runCommand",
						value: function () {
							var t = this.commandList.pop();
							this.isRunning = !0, this.cmdHandler(t)
						}
					}, {
						key: "bindCmdHandler",
						value: function (t) {
							this.cmdHandler = t
						}
					}, {
						key: "onCmdComplete",
						value: function () {
							this.commandList.length ? this.runCommand() : this.isRunning = !1
						}
					}, {
						key: "destroy",
						value: function () {
							this.commandList = [], this.gameId = 0, this.seq = 0, this.icTimeout && clearTimeout(this.icTimeout), this.icTimeout = null, this.isRunning = !1
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(37)),
				o = n(i(33)),
				s = n(i(34)),
				h = (i(3), i(1)),
				l = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e
					}
					return r(t, [{
						key: "init",
						value: function () {
							this.gameView = this.game.gameView, this.queryCtrl = new a.default(this.game), this.netWorkCtrl = new s.default(this.game), this.modeCtrl = new o.default(this.game), this.model = this.game.gameModel, this.reporter = this.game.reporter, this.historyTimes = this.game.historyTimes, this.viewer = this.game.viewer
						}
					}, {
						key: "firstInitGame",
						value: function (t) {
							this.queryCtrl.identifyMode(t), this.modeCtrl.initFirstPage(t)
						}
					}, {
						key: "identifyModeErr",
						value: function (t) {
							this.gameView.showIdentifyModeErr(t)
						}
					}, {
						key: "onLoginSuccess",
						value: function () {
							this.reporter.setTimer(h.REPORTERTIMEOUT)
						}
					}, {
						key: "clickStart",
						value: function () {
							this.modeCtrl.clickStart()
						}
					}, {
						key: "showFriendRank",
						value: function () {
							this.modeCtrl.showFriendRank()
						}
					}, {
						key: "clickRank",
						value: function () {
							this.modeCtrl.clickRank()
						}
					}, {
						key: "gameOver",
						value: function (t) {
							if (this.model.setScore(t), "observe" != this.model.mode) {
								var e = this.model.getHighestScore(),
									i = this.model.weekBestScore;
								this.historyTimes.addOne();
								var n = this.historyTimes.getTimes();
								if (this.reporter.playGameReport(t, e, n), i < t) {
									var r = {
										seed: this.game.randomSeed,
										action: this.game.actionList,
										musicList: this.game.musicList
									};
									this.historyTimes.upLoadHistoryTimes(t, r)
								} else this.historyTimes.checkUp();
								this.netWorkCtrl.upDateFriendsScoreList()
							}
							"player" == this.mode && this.reporter.playAudienceReport(), "battle" == this.mode && this.reporter.playPKReport(t)
						}
					}, {
						key: "gameOverShowPage",
						value: function () {
							if (this.modeCtrl.showGameOverPage(), "observe" != this.model.mode && this.model.currentScore >= this.model.weekBestScore && (this.model.weekBestScore = this.model.currentScore, this.model.saveWeekBestScore(this.model.currentScore), this.model.currentScore > this.model.getHighestScore())) {
								var t = {
									seed: this.game.randomSeed,
									action: this.game.actionList
								};
								this.model.saveHeighestScore(this.model.currentScore, t)
							}
						}
					}, {
						key: "clickReplay",
						value: function () {
							this.reporter.playAudienceReportStart(), this.modeCtrl.gameOverClickReplay()
						}
					}, {
						key: "friendRankReturn",
						value: function () {
							this.modeCtrl.friendRankReturn()
						}
					}, {
						key: "netWorkLogin",
						value: function () {
							this.netWorkCtrl.netWorkLogin()
						}
					}, {
						key: "shareGroupRank",
						value: function () {
							this.modeCtrl.shareGroupRank()
						}
					}, {
						key: "afterShareGroupRank",
						value: function (t, e) {
							this.reporter.shareGroupReport(e)
						}
					}, {
						key: "shareBattleCard",
						value: function () {
							this.modeCtrl.shareBattleCard()
						}
					}, {
						key: "afterShareBattle",
						value: function (t, e) {
							t && this.reporter.sharePKReport(e)
						}
					}, {
						key: "groupPlayGame",
						value: function () {
							this.modeCtrl.groupPlayGame()
						}
					}, {
						key: "loginBattle",
						value: function (t) {
							this.reporter.joinPKReport(t), this.reporter.playPKReportStart(t)
						}
					}, {
						key: "showPkPage",
						value: function (t) {
							this.reporter.playPKScore(t)
						}
					}, {
						key: "onBattlePlay",
						value: function (t) {
							this.modeCtrl.battlePlay(t)
						}
					}, {
						key: "battleToSingle",
						value: function () {
							this.reporter.resetPKReport()
						}
					}, {
						key: "shareObservCard",
						value: function () {
							this.modeCtrl.shareObservCard()
						}
					}, {
						key: "socketJoinSuccess",
						value: function (t) {
							this.modeCtrl.socketJoinSuccess(t), "observe" == this.model.mode ? t && (this.game.socketFirstSync = !0, this.reporter.joinAudienceReportStart()) : this.reporter.joinAudienceReport(), "player" == this.model.mode && this.reporter.playAudienceReportStart()
						}
					}, {
						key: "afterShareObserveCard",
						value: function (t) {
							this.reporter.shareAudienceReport(t)
						}
					}, {
						key: "showPlayerGG",
						value: function (t) {
							this.modeCtrl.showPlayerGG(t)
						}
					}, {
						key: "showPlayerWaiting",
						value: function () {
							this.modeCtrl.showPlayerWaiting()
						}
					}, {
						key: "onPlayerOut",
						value: function () {
							this.modeCtrl.onPlayerOut()
						}
					}, {
						key: "onViewerStart",
						value: function () {
							this.game.audioManager.scale_intro.stop(), this.game.deadTimeout && (clearTimeout(this.game.deadTimeout), this.game.deadTimeout = null), this.game.pendingReset = !1, this.modeCtrl.onViewerStart(), this.reporter.joinAudienceReport()
						}
					}, {
						key: "wxOnShow",
						value: function (t) {
							var e = this;
							this.netWorkCtrl.requestServerInit(), this.reporter.setTimer(h.REPORTERTIMEOUT), setTimeout(function () {
								t.query && t.query.hasOwnProperty("mode") ? e.modeCtrl.reInitFirstPage(t) : "single" != e.model.mode && "player" != e.model.mode && "battle" != e.model.mode && e.modeCtrl.changeMode("singleCtrl")
							}, 300)
						}
					}, {
						key: "wxOnhide",
						value: function () {
							this.reporter.quitReport(), "observe" == this.model.mode && this.reporter.joinAudienceReport(), this.netWorkCtrl.clearServerInit(), this.reporter.clearTimer(), this.modeCtrl.wxOnhide()
						}
					}, {
						key: "onReplayGame",
						value: function () {
							"observe" != this.model.mode && this.reporter.playGameReportStart()
						}
					}, {
						key: "onPeopleCome",
						value: function (t) {
							0 == t.audience_cmd ? (this.viewer.peopleCome(t), this.reporter.playAudienceReportMaxPeople(this.viewer.num)) : 1 == t.audience_cmd && this.viewer.peopleOut(t)
						}
					}, {
						key: "onServerConfigForbid",
						value: function () {}
					}, {
						key: "onSocketCloseErr",
						value: function () {
							this.gameView.showSocketCloseErr(), this.modeCtrl.changeMode("singleCtrl")
						}
					}]), t
				}();
			e.default = l
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(4)),
				o = n(i(5)),
				s = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.mode = "", this.stage = "", this.is_from_wn = 0, this.firstBlood = !1, this.currentScore = 0, this.highestScore = 0, this.observeInfo = {}, this.friendsScore = [], this.weekBestScore = 0, this.startTime = Math.floor(Date.now() / 1e3)
					}
					return r(t, [{
						key: "setMode",
						value: function (t) {
							this.mode = t, this.game.mode = t
						}
					}, {
						key: "setStage",
						value: function (t) {
							this.stage = t, this.game.stage = t
						}
					}, {
						key: "init",
						value: function () {
							o.default.init();
							a.default.getFirstBlood() || (this.setFirstBlood(!0), a.default.saveFirstBlood()), this.highestScore = a.default.getHeighestScore() || 0, o.default.setServerConfig(a.default.getServerConfig()), this.weekBestScore = a.default.getWeekBestScore() || 0, this.friendsScore = a.default.getFriendsScore()
						}
					}, {
						key: "getServerConfig",
						value: function () {
							return o.default.serverConfig
						}
					}, {
						key: "setIsFromWn",
						value: function (t) {
							this.is_from_wn = t, this.game.is_from_wn = t
						}
					}, {
						key: "setFirstBlood",
						value: function (t) {
							this.firstBlood = t, this.game.firstBlood = t
						}
					}, {
						key: "getMode",
						value: function () {
							return this.mode
						}
					}, {
						key: "setScore",
						value: function (t) {
							this.currentScore = t
						}
					}, {
						key: "saveHeighestScore",
						value: function (t) {
							var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "";
							if (e) i = {
								ts: this.getNextSunday(),
								data: e
							};
							else var i = "";
							a.default.saveHeighestScore(t), a.default.saveActionData(i), this.highestScore = t
						}
					}, {
						key: "saveWeekBestScore",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
								e = {
									ts: this.getNextSunday(),
									data: t
								};
							a.default.saveWeekBestScore(e)
						}
					}, {
						key: "getActionData",
						value: function () {
							return a.default.getActionData()
						}
					}, {
						key: "getHighestScore",
						value: function () {
							return this.highestScore
						}
					}, {
						key: "saveFriendsScore",
						value: function (t) {
							this.friendsScore = t;
							var e = {
								ts: this.getNextSunday(),
								data: t
							};
							a.default.saveFriendsScore(e)
						}
					}, {
						key: "getSessionId",
						value: function () {
							return o.default.sessionId
						}
					}, {
						key: "getPkId",
						value: function () {
							return o.default.pkId
						}
					}, {
						key: "clearPkId",
						value: function () {
							o.default.clearPkId()
						}
					}, {
						key: "setShareTicket",
						value: function (t) {
							o.default.setShareTicket(t)
						}
					}, {
						key: "getShareTicket",
						value: function () {
							return o.default.shareTicket
						}
					}, {
						key: "clearShareTicket",
						value: function () {
							o.default.clearShareTicket()
						}
					}, {
						key: "setGameId",
						value: function (t) {
							o.default.setGameId(t)
						}
					}, {
						key: "setGameTicket",
						value: function (t) {
							o.default.setGameTicket(t)
						}
					}, {
						key: "clearGameId",
						value: function () {
							o.default.clearGameId()
						}
					}, {
						key: "clearGameTicket",
						value: function () {
							o.default.clearGameTicket()
						}
					}, {
						key: "setObserveInfo",
						value: function (t) {
							this.observeInfo.headimg = t.headimg, this.observeInfo.nickName = t.nickName
						}
					}, {
						key: "clearObserveInfo",
						value: function () {
							this.observeInfo.headimg = null, this.observeInfo.nickName = null
						}
					}, {
						key: "getNextSunday",
						value: function () {
							var t = new Date,
								e = t.getDay();
							t.setHours(0, 0, 0, 0);
							return t.valueOf() + 24 * (7 - e) * 60 * 60 * 1e3
						}
					}]), t
				}();
			e.default = s
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e
					}
					return n(t, [{
						key: "init",
						value: function () {}
					}, {
						key: "showIdentifyModeErr",
						value: function (t) {
							this.showModal(t)
						}
					}, {
						key: "showNoSession",
						value: function () {
							this.showModal()
						}
					}, {
						key: "showGetPkIdFail",
						value: function () {
							this.showModal()
						}
					}, {
						key: "showGroupShareFail",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "网络异常,点击确定回到游戏";
							this.showModal(t)
						}
					}, {
						key: "showGoToBattleFail",
						value: function () {
							this.showModal()
						}
					}, {
						key: "showUploadPkScoreFail",
						value: function () {
							this.showModal("数据上传失败")
						}
					}, {
						key: "showShareObserveCardFail",
						value: function (t) {
							this.showModal(t)
						}
					}, {
						key: "showObserveStateFail",
						value: function () {
							this.showModal("服务器异常")
						}
					}, {
						key: "showModal",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "网络异常,点击确定回到游戏";
							wx.showModal({
								title: "提示",
								content: t,
								showCancel: !1
							})
						}
					}, {
						key: "showServeConfigForbiddenObserveMode",
						value: function () {
							this.showModal("当前围观人数过多，请稍后再试")
						}
					}, {
						key: "showServeConfigForbiddenGroupShare",
						value: function () {
							this.showModal("查看群排行人数过多，请稍后再试")
						}
					}, {
						key: "showSocketCloseErr",
						value: function () {
							this.showModal("网络连接异常，点击确定回到游戏")
						}
					}, {
						key: "showSyncopErr",
						value: function () {}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				a = i(1),
				o = i(3),
				s = window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth,
				h = window.innerHeight < window.innerWidth ? window.innerHeight : window.innerWidth,
				l = function () {
					function t() {
						var e = this;
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.obj = new r.Object3D, this.obj.name = "ground", this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d"), this.canvas.width = 64, this.canvas.height = 64;
						var i = new r.PlaneGeometry(h / s * a.FRUSTUMSIZE, a.FRUSTUMSIZE);
						this.materials = [];
						for (var n = [
								["rgba(215, 219, 230, 1)", "rgba(188, 190, 199, 1)"],
								["rgba(255, 231, 220, 1)", "rgba(255, 196, 204, 1)"],
								["rgba(255, 224, 163, 1)", "rgba(255, 202, 126, 1)"],
								["rgba(255, 248, 185, 1)", "rgba(255, 245, 139, 1)"],
								["rgba(218, 244, 255, 1)", "rgba(207, 233, 210, 1)"],
								["rgba(219, 235, 255, 1)", "rgba(185, 213, 235, 1)"],
								["rgba(216, 218, 255, 1)", "rgba(165, 176, 232, 1)"],
								["rgba(207, 207, 207, 1)", "rgba(199, 196, 201, 1)"]
							], o = this, l = 0; l < 7; ++l) setTimeout(function (t) {
							return function () {
								o.generateLaserBodyCanvas(n[t][0], n[t][1]);
								var e = new r.Texture(o.canvas);
								e.needsUpdate = !0;
								var a = new r.MeshBasicMaterial({
									map: e,
									opacity: 1,
									transparent: !0
								});
								o.materials.push(a);
								var s = new r.Mesh(i, a);
								s.position.z = .1 * -(t + 1), s.name = t, s.updateMatrix(), s.matrixAutoUpdate = !1, o.obj.add(s)
							}
						}(l), 1e3 * l);
						setTimeout(function () {
							for (var t = 1; t < 7; ++t) e.obj.children[t].visible = !1
						}, 8e3), this.current = 0
					}
					return n(t, [{
						key: "generateLaserBodyCanvas",
						value: function (t, e) {
							this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
							var i = this.context.createLinearGradient(0, 0, 0, this.canvas.height);
							i.addColorStop(0, t), i.addColorStop(1, e), this.context.fillStyle = i, this.context.fillRect(0, 0, this.canvas.width, this.canvas.height)
						}
					}, {
						key: "changeColor",
						value: function () {
							var t = this,
								e = this.current + 1 > 6 ? 0 : this.current + 1,
								i = this.current;
							o.customAnimation.to(this.materials[this.current], 5, {
								opacity: 0,
								onComplete: function () {
									t.obj.children[i].visible = !1
								}
							}), this.obj.children[e].visible = !0, o.customAnimation.to(this.materials[e], 4, {
								opacity: 1
							}), this.current = e
						}
					}]), t
				}();
			e.default = l
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(2)),
				a = function () {
					function t() {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.timeOut = null, this.reportList = [], this.pkState = {
							isGroup: 0,
							score: 0
						}, this.singleState = 0, this.observeState = {
							startTime: 0,
							success: 0
						}, this.playerState = {
							startTime: 0,
							maxAudience: 0
						}, this.gameStartTime = 0;
						try {
							var e = wx.getSystemInfoSync();
							this.clientInfo = {
								platform: e.platform,
								brand: e.brand,
								model: e.model,
								system: e.system
							}
						} catch (t) {
							console.log(t)
						}
					}
					return n(t, [{
						key: "getTime",
						value: function () {
							var t = Date.now();
							return t = Math.floor(t / 1e3)
						}
					}, {
						key: "enterReport",
						value: function (t) {
							if (this.gameStartTime = this.getTime(), t) {
								var e = {
									ts: this.getTime(),
									type: 0,
									scene: t
								};
								this.reportList.push(e)
							}
						}
					}, {
						key: "quitReport",
						value: function () {
							if (this.gameStartTime) {
								var t = {
									ts: this.getTime(),
									type: 1,
									duration: this.getTime() - this.gameStartTime
								};
								this.reportList.push(t)
							}
						}
					}, {
						key: "playGameReport",
						value: function (t, e, i) {
							if (this.singleState) {
								var n = {
									ts: this.getTime(),
									type: 2,
									score: t,
									best_score: e,
									break_record: t > e ? 1 : 0,
									duration: this.getTime() - this.singleState,
									times: i
								};
								this.reportList.push(n), this.singleState = 0
							}
						}
					}, {
						key: "playGameReportStart",
						value: function () {
							this.singleState = this.getTime()
						}
					}, {
						key: "shareAudienceReport",
						value: function (t) {
							var e = {
								ts: this.getTime(),
								type: 3,
								is_group: t
							};
							this.reportList.push(e)
						}
					}, {
						key: "playAudienceReport",
						value: function () {
							if (this.playerState.startTime) {
								var t = {
									ts: this.getTime(),
									type: 4,
									duration: this.getTime() - this.playerState.startTime,
									max_audience: this.playerState.maxAudience
								};
								this.reportList.push(t), this.playerState.startTime = 0, this.playerState.maxAudience = 0
							}
						}
					}, {
						key: "playAudienceReportStart",
						value: function () {
							this.playerState.startTime = this.getTime();
							var t = {
								ts: this.getTime(),
								type: 10
							};
							this.reportList.push(t)
						}
					}, {
						key: "playAudienceReportMaxPeople",
						value: function (t) {
							this.playerState.maxAudience < t && (this.playerState.maxAudience = t)
						}
					}, {
						key: "joinAudienceReport",
						value: function () {
							var t = 0 == this.observeState.startTime ? 0 : this.getTime() - this.observeState.startTime,
								e = {
									ts: this.getTime(),
									type: 5,
									duration: t,
									join_audience_success: this.observeState.success
								};
							this.reportList.push(e), this.observeState.startTime = 0, this.observeState.success = 0
						}
					}, {
						key: "joinAudienceReportStart",
						value: function () {
							this.observeState.startTime = this.getTime(), this.observeState.success = 1
						}
					}, {
						key: "shareGroupReport",
						value: function (t) {
							var e = {
								ts: this.getTime(),
								type: 6,
								is_group: t
							};
							this.reportList.push(e)
						}
					}, {
						key: "sharePKReport",
						value: function (t) {
							var e = {
								ts: this.getTime(),
								type: 7,
								is_group: t
							};
							this.reportList.push(e)
						}
					}, {
						key: "joinPKReport",
						value: function (t) {
							var e = {
								ts: this.getTime(),
								type: 8,
								is_group: t
							};
							this.reportList.push(e)
						}
					}, {
						key: "playPKReport",
						value: function (t) {
							var e = 0;
							t == this.pkState.score && (e = 1), t > this.pkState.score && (e = 3);
							var i = {
								ts: this.getTime(),
								type: 9,
								is_group: this.pkState.isGroup,
								result: e
							};
							this.reportList.push(i)
						}
					}, {
						key: "playPKReportStart",
						value: function (t) {
							this.pkState.isGroup = t
						}
					}, {
						key: "playPKScore",
						value: function (t) {
							this.pkState.score = t
						}
					}, {
						key: "resetPKReport",
						value: function () {
							this.pkState.isGroup = 0, this.pkState.score = 0
						}
					}, {
						key: "sendReport",
						value: function () {
							this.reportList.length && (r.default.sendReport(this.reportList, this.clientInfo), this.reportList = [])
						}
					}, {
						key: "clearTimer",
						value: function () {
							this.timeOut && clearInterval(this.timeOut)
						}
					}, {
						key: "setTimer",
						value: function (t) {
							this.timeOut = setInterval(this.sendReport.bind(this), t)
						}
					}]), t
				}();
			e.default = a
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(5)),
				o = n(i(2)),
				s = function () {
					function t(e) {
						var i = this;
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.alive = !1, this.noErr = !1, this.game = e, this.handlers = {}, this.handleSocketErr = "", this.heartBeat = [], this.cmdPool = {}, wx.onSocketOpen(function (t) {
							i.joinGame()
						}), wx.onSocketClose(function (t) {
							"player" != i.game.mode || i.noErr || (o.default.quitGame(), i.game.gameCtrl.onSocketCloseErr()), "observe" != i.game.mode || i.noErr || i.game.gameCtrl.onSocketCloseErr(), i.alive = !1
						}), wx.onSocketError(function (t) {}), wx.onSocketMessage(function (t) {
							i.cleanHeartBeat();
							var e;
							try {
								e = JSON.parse(t.data)
							} catch (t) {
								return i.game.handleWxOnError({
									message: "socket receive wrong msg JSON.parse(res.data) error",
									stack: ""
								}), void wx.closeSocket()
							}
							106 === e.cmd && i.handleACK(e), 101 === e.cmd && i.handleJoinGame(e), e.cmd, 108 === e.cmd && i.handlePeopleCome(e), 102 === e.cmd && i.receiveCommand(e), 109 == e.cmd && i.close(), 107 == e.cmd && i.handlePlayerOut(), i.heartBeat.push(setTimeout(i.sendHeartBeat.bind(i), 5e3))
						})
					}
					return r(t, [{
						key: "cleanHeartBeat",
						value: function () {
							if (this.heartBeat.length)
								for (; this.heartBeat.length;) {
									var t = this.heartBeat.pop();
									clearTimeout(t)
								}
						}
					}, {
						key: "handleSocketOpen",
						value: function () {
							this.joinGame(), this.alive = !0
						}
					}, {
						key: "connectSocket",
						value: function () {
							var t = this;
							this.alive = !0, wx.connectSocket({
								url: "wss://wxagame.weixin.qq.com",
								fail: function () {
									t.alive = !1
								}
							})
						}
					}, {
						key: "addHandler",
						value: function (t, e) {
							this.handlers[t] ? this.handlers[t].push(e) : this.handlers[t] = [e]
						}
					}, {
						key: "sendCommand",
						value: function (t, e) {
							var i = a.default.gameId,
								n = a.default.gameTicket;
							if (i && n && t)
								if ("string" == typeof i) {
									var r = {
										cmd: 102,
										i: i,
										n: t,
										k: n,
										o: [JSON.stringify(e)]
									};
									wx.sendSocketMessage({
										data: JSON.stringify(r)
									})
								} else console.warn("Socket send cmd need gameId")
						}
					}, {
						key: "sendNullCommand",
						value: function () {
							var t = a.default.gameId,
								e = a.default.gameTicket;
							if (t && e)
								if ("string" == typeof t) {
									var i = {
										cmd: 102,
										i: t,
										k: e,
										o: []
									};
									wx.sendSocketMessage({
										data: JSON.stringify(i)
									})
								} else console.warn("Socket send cmd need gameId")
						}
					}, {
						key: "getCommand",
						value: function (t) {}
					}, {
						key: "onPeopleCome",
						value: function (t) {
							this.peopleCome = t
						}
					}, {
						key: "onReciveCommand",
						value: function (t) {
							this.observerMessage = t
						}
					}, {
						key: "onJoinSuccess",
						value: function (t) {
							this.joinSuccess = t
						}
					}, {
						key: "onPlayerOut",
						value: function (t) {
							this.playerOutHandler = t
						}
					}, {
						key: "receiveCommand",
						value: function (t) {
							"function" == typeof this.observerMessage && t.o && t.o[0] && t.o[0].o && this.observerMessage(t.n, JSON.parse(t.o[0].o))
						}
					}, {
						key: "handlePeopleCome",
						value: function (t) {
							"function" == typeof this.peopleCome && this.peopleCome(t)
						}
					}, {
						key: "receiveACK",
						value: function () {}
					}, {
						key: "joinGame",
						value: function () {
							var t = a.default.gameId;
							if (a.default.sessionId && t) {
								var e = {
									cmd: 101,
									game_id: t,
									fast: 1,
									session_id: a.default.sessionId
								};
								wx.sendSocketMessage({
									data: JSON.stringify(e)
								})
							} else this.handleConnectSocketFail()
						}
					}, {
						key: "handleACK",
						value: function (t) {
							this.handlers.ack && this.handlers.ack.forEach(function (e) {
								e(t)
							})
						}
					}, {
						key: "handleJoinGame",
						value: function (t) {
							if ("observe" == this.game.mode) switch (t.ret) {
								case 0:
								case 2:
									this.joinSuccess(!0);
									break;
								default:
									this.joinSuccess(!1)
							} else 0 != t.ret ? this.joinSuccess(!1) : this.joinSuccess(!0)
						}
					}, {
						key: "sendHeartBeat",
						value: function () {
							if ("player" == this.game.mode) this.sendNullCommand();
							else {
								var t = {
									cmd: 104
								};
								wx.sendSocketMessage({
									data: JSON.stringify(t)
								})
							}
						}
					}, {
						key: "quitObserve",
						value: function () {
							if (this.alive) {
								var t = {
									cmd: 109,
									fast: 1,
									game_id: a.default.gameId,
									session_id: a.default.sessionId
								};
								wx.sendSocketMessage({
									data: JSON.stringify(t)
								})
							}
						}
					}, {
						key: "close",
						value: function () {
							var t = this;
							this.alive && (this.alive = !1, this.noErr = !0, wx.closeSocket(), a.default.clearShareTicket(), a.default.clearGameId(), setTimeout(function () {
								t.reset()
							}, 1e3))
						}
					}, {
						key: "onSocketErr",
						value: function (t) {
							this.handleSocketErr = t
						}
					}, {
						key: "reset",
						value: function () {
							this.alive = !1, this.noErr = !1
						}
					}, {
						key: "handlePlayerOut",
						value: function () {
							"function" == typeof this.playerOutHandler && this.playerOutHandler()
						}
					}]), t
				}();
			e.default = s
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				o = i(1),
				s = i(3),
				h = n(i(4)),
				l = n(i(10)),
				c = (n(i(55)), window.devicePixelRatio > 2 ? 2 : window.devicePixelRatio),
				u = window.innerHeight < window.innerWidth ? window.innerHeight : window.innerWidth,
				d = window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth,
				f = d * c,
				p = u * c,
				m = ["btn", "bg", "list1", "list2"],
				g = {
					friendRank: 0,
					groupRank: 1,
					gameOver: 2,
					start: 3,
					pk: 4,
					lookers: 5,
					gameOverNew: 6,
					gameOverHighest: 7,
					beginner: 8
				},
				v = o.FRUSTUMSIZE,
				y = p / f * v,
				b = !1,
				x = wx.loadFont("res/num.ttf"),
				_ = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.texture = {}, this.material = {}, this.geometry = {}, this.obj = {}, this.canvas = {}, this.context = {}, this._touchInfo = {
							trackingID: -1,
							maxDy: 0,
							maxDx: 0
						}, this.options = Object.assign({}, {}, e), this.imgid = {
							btn: 0,
							bg: 0,
							list1: 0,
							list2: 0
						}, this.options.onGroupShare = e.onGroupShare, this.options.friendRankReturn = e.friendRankReturn, this.options.groupPlayGame = e.groupPlayGame, this.options.onClickRank = e.onClickRank, this.options.onClickReplay = e.onClickReplay, this.options.onClickShare = e.onClickShare, this.options.onClickPureShare = e.onClickPureShare, this.options.onClickStart = e.onClickStart, this.options.onShowFriendRank = e.onShowFriendRank, this.options.onBattlePlay = e.onBattlePlay, this.options.onLookersStart = e.onLookersStart, this.p0 = new a.Vector3(0, 0, 9), this.p1 = new a.Vector3(-y * (.5 - this._cx(30) / p), (.5 - this._cy(143) / f) * v, 9), this.p2 = new a.Vector3(y * (.5 - this._cx(30) / p), v * (.5 - this._cy(143) / f), 9), this.p3 = new a.Vector3(y * (.5 - this._cx(30) / p), -v * (.5 - this._cy(144) / f), 9), this.p4 = new a.Vector3(-y * (.5 - this._cx(30) / p), -v * (.5 - this._cy(144) / f), 9), this.p5 = new a.Vector3(-y * (.5 - this._cx(30) / p), (.5 - this._cy(205) / f) * v, 9), this.p6 = new a.Vector3(y * (.5 - this._cx(30) / p), v * (.5 - this._cy(205) / f), 9), this.p7 = new a.Vector3(y * (.5 - this._cx(30) / p), -v * (.5 - this._cy(104) / f), 9), this.p8 = new a.Vector3(-y * (.5 - this._cx(30) / p), -v * (.5 - this._cy(104) / f), 9), b && (m = ["sample", "btn", "bg", "list1", "list2"])
					}
					return r(t, [{
						key: "showFriendRankList",
						value: function (t) {
							this.showState = !0, t = t || {}, this.canvasType = g.friendRank, this.myUserInfo = h.default.getMyUserInfo() || {}, this.myUserInfo.week_best_score = t.week_best_score || 0, this._createPlane(), this._updateClip(), this._drawRankListBg(), this.renderRankList(h.default.getFriendsScore())
						}
					}, {
						key: "showGroupRankList",
						value: function (t, e) {
							this.showState = !0, this.canvasType = g.groupRank, this.myUserInfo = e || {
								headimg: "",
								nickname: "",
								week_best_score: 0,
								grade: 1
							}, this._createPlane(), this._updateClip(), this.renderRankList(t), this._drawRankListBg()
						}
					}, {
						key: "showGameOverPage",
						value: function (t) {
							this.showState = !0, t = t || {}, this.opt = t || this.opt, this._createPlane(), this.myUserInfo = h.default.getMyUserInfo() || {
								headimg: "",
								nickname: "",
								week_best_score: 0,
								score_info: [{
									score: 0
								}]
							}, this.myUserInfo.last_week_best_score = t.week_best_score, this.myUserInfo.week_best_score = Math.max(t.week_best_score, t.score) || 0;
							var e = h.default.getFriendsScore() || [];
							e.push(this.myUserInfo);
							var i = this._rerank(e);
							if (this.sotedRankList = i, this.myidx = i.findIndex(this._findSelfIndex.bind(this)) + 1, t.score >= t.highest_score || t.score >= this.myUserInfo.last_week_best_score) {
								(h.default.getMyUserInfo() || {
									headimg: "",
									nickname: "",
									week_best_score: 0,
									score_info: [{
										score: 0
									}]
								}).week_best_score = t.score;
								var n = h.default.getFriendsScore() || [];
								this.changlleList = [];
								for (var r = 0; r < n.length; r++) n[r].week_best_score < t.score && n[r].week_best_score > this.myUserInfo.last_week_best_score && this.changlleList.push(n[r])
							}
							t.score > t.highest_score ? (this.canvasType = g.gameOverHighest, this.opt.type = "history", this.opt.msg = "历史最高分", this._drawGameOverHighest(this.opt, "history")) : i.length > 1 && t.score >= i[0].week_best_score ? (this.canvasType = g.gameOverHighest, this.opt.type = "rank", this._drawGameOverHighest(this.opt, "rank")) : t.score > this.myUserInfo.last_week_best_score ? (this.canvasType = g.gameOverHighest, this.opt.type = "history", this.opt.msg = "本周最高分", this._drawGameOverHighest(this.opt, "history")) : (this.canvasType = g.gameOver, this._drawGameOver())
						}
					}, {
						key: "showStartPage",
						value: function (t) {
							b || (this.showState = !0, this.canvasType = g.start, this._createPlane(), this._drawStart(t))
						}
					}, {
						key: "showPkPage",
						value: function (t) {
							this.showState = !0, t = t || {}, this.data = t.data, this.canvasType = g.pk, this._createPlane(), this._updateClip(), this.myidx = this.data.pkListInfo.findIndex(this._findPartner) + 1, this.myUserInfo = this.data.pkListInfo[this.myidx - 1] || h.default.getMyUserInfo(), this.renderRankList(this.data.pkListInfo), this._drawPKListBg()
						}
					}, {
						key: "showLookersPage",
						value: function (t) {
							this.showState = !0, this.canvasType = g.lookers, this._createPlane(), this._drawLookers(t)
						}
					}, {
						key: "showBeginnerPage",
						value: function () {
							this.showState = !0, this.canvasType = g.beginner, this._createPlane(), this._drawBeginner()
						}
					}, {
						key: "hide2D",
						value: function () {
							if (!b) {
								this.showState = !1;
								for (var t = 0; t < m.length; t++) this.obj[m[t]] && (this.obj[m[t]].visible = !1, this.options.camera.remove(this.obj[m[t]]))
							}
						}
					}, {
						key: "hide2DGradually",
						value: function () {
							if (!b)
								for (var t = this, e = 0; e < m.length; e++) this.obj[m[e]] && s.customAnimation.to(this.material[m[e]], 1, {
									opacity: 0,
									onComplete: function (e) {
										return function () {
											t.material[m[e]].opacity = 1, t.obj[m[e]].visible = !1, t.showState = !1, t.options.camera.remove(t.obj[m[e]])
										}
									}(e)
								})
						}
					}, {
						key: "_findDelta",
						value: function (t) {
							var e = this._touchInfo,
								i = t.touches[0] || t.changedTouches[0];
							return i ? {
								x: i.pageX - e.x,
								y: i.pageY - e.y
							} : null
						}
					}, {
						key: "doTouchStartEvent",
						value: function (t) {
							var e = t.changedTouches[0].pageX,
								i = t.changedTouches[0].pageY;
							if (this.startX = e, this.startY = i, this.canvasType == g.friendRank || this.canvasType == g.groupRank || this.canvasType == g.pk) {
								var n = this._touchInfo,
									r = this.scrollHandler;
								if (!r) return;
								n.trackingID = "touch", n.x = t.touches[0].pageX, n.y = t.touches[0].pageY, n.maxDx = 0, n.maxDy = 0, n.historyX = [0], n.historyY = [0], n.historyTime = [+new Date], n.listener = r, r.onTouchStart && r.onTouchStart()
							} else this.canvasType == g.gameOver ? (e = this._cxp(e), i = this._cyp(i), (!this.noplay_time || this.noplay_time < 0) && e > 117 && e < 297 && i > 540 && i < 660 && this._drawGameOverBtnClick()) : this.canvasType == g.start && (e = this._cxp(e), i = this._cyp(i), e > 100 && e < 320 && i > 515 && i < 645 && this._drawStartClick())
						}
					}, {
						key: "doTouchMoveEvent",
						value: function (t) {
							if (this.canvasType == g.friendRank || this.canvasType == g.groupRank || this.canvasType == g.pk) {
								var e = this._touchInfo;
								if (-1 == e.trackingID) return;
								t.preventDefault();
								var i = this._findDelta(t);
								if (!i) return;
								e.maxDy = Math.max(e.maxDy, Math.abs(i.y)), e.maxDx = Math.max(e.maxDx, Math.abs(i.x));
								var n = +new Date;
								for (e.historyX.push(i.x), e.historyY.push(i.y), e.historyTime.push(n); e.historyTime.length > 10;) e.historyTime.shift(), e.historyX.shift(), e.historyY.shift();
								e.listener && e.listener.onTouchMove && e.listener.onTouchMove(i.x, i.y, n)
							}
						}
					}, {
						key: "doTouchEndEvent",
						value: function (t) {
							var e = t.changedTouches[0].pageX,
								i = t.changedTouches[0].pageY,
								n = !0;
							if (this.canvasType != g.friendRank && this.canvasType != g.groupRank && this.canvasType != g.pk && this.canvasType != g.gameOver || !(Math.abs(e - this.startX) > 5 || Math.abs(i - this.startY) > 5) || (n = !1), e = this._cxp(e), i = this._cyp(i), n) {
								if (this.canvasType == g.groupRank && e > 134 && e < 283 && i > 640 && i < 727) return this.hide2D(), void(!!this.options.groupPlayGame && this.options.groupPlayGame());
								if (this.canvasType == g.friendRank) {
									if (e > 120 && e < 300 && i > 640 && i < 720) return void(!!this.options.onGroupShare && this.options.onGroupShare());
									if (e > 330 && e < 408 && i > 100 && i < 200) return void(this.opt ? (this.hide2D(), this.showState = !0, this.canvasType = g.gameOver, this._drawGameOver()) : !!this.options.friendRankReturn && this.options.friendRankReturn(""))
								}
								if (this.canvasType == g.gameOver) return void("beginner" != this.opt.type && "tired" != this.opt.type && e > 25 && e < 385 && i > 290 && i < 500 ? !!this.options.onClickRank && this.options.onClickRank() : e > 150 && e < 260 && i > 199 && i < 260 ? !!this.options.onClickShare && this.options.onClickShare() : (!this.noplay_time || this.noplay_time < 0) && e > 117 && e < 297 && i > 540 && i < 660 ? !!this.options.onClickReplay && this.options.onClickReplay() : (!this.noplay_time || this.noplay_time < 0) && this._drawGameOverBtnClickRevert());
								if (this.canvasType == g.gameOverHighest && (e > 340 && e < 407 && i > 76 && i < 138 ? (this.canvasType = g.gameOver, this._drawGameOver()) : e > 111 && e < 380 && i > 540 && i < 660 ? !!this.options.onClickReplay && this.options.onClickReplay() : this.changlleList.length > 0 && e > 170 && e < 230 && i > 330 && i < 390 ? !!this.options.onClickPureShare && this.options.onClickPureShare(this.opt.type) : 0 == this.changlleList.length && e > 170 && e < 230 && i > 410 && i < 470 ? !!this.options.onClickPureShare && this.options.onClickPureShare(this.opt.type) : this.changlleList.length > 7 && e > 55 && e < 115 && i > 437 && i < 497 ? this._reDrawChangeAva(-1) : this.changlleList.length > 7 && e > 297 && e < 357 && i > 437 && i < 497 && this._reDrawChangeAva(1)), this.canvasType == g.start) return void(e > 100 && e < 320 && i > 515 && i < 645 ? !!this.options.onClickStart && this.options.onClickStart() : e > 110 && e < 290 && i > 645 && i < 705 ? !!this.options.onShowFriendRank && this.options.onShowFriendRank() : this._drawStartClickRevert());
								if (this.canvasType == g.pk) {
									if (e > 110 && e < 310 && i > 650 && i < 730) return void(!!this.options.onBattlePlay && this.options.onBattlePlay(""));
									if (this.data.organizerInfo.left_time > 0 && 0 == this.data.organizerInfo.is_self && e > 140 && e < 280 && i > 325 && i < 405) return void(!!this.options.onBattlePlay && this.options.onBattlePlay("pk"))
								}
								if (this.canvasType == g.lookers) return void(e > 130 && e < 280 && i > 650 && i < 720 && !!this.options.onLookersStart && this.options.onLookersStart())
							}
							var r = this._touchInfo;
							if (-1 != r.trackingID) {
								t.preventDefault();
								var a = this._findDelta(t);
								if (a) {
									var o = r.listener;
									r.trackingID = -1, r.listener = null;
									var s = {
										x: 0,
										y: 0
									};
									if (r.historyTime.length > 2)
										for (var h = r.historyTime.length - 1, l = r.historyTime[h], c = r.historyX[h], u = r.historyY[h]; h > 0;) {
											h--;
											var d = l - r.historyTime[h];
											if (d > 30 && d < 50) {
												s.x = (c - r.historyX[h]) / (d / 1e3), s.y = (u - r.historyY[h]) / (d / 1e3);
												break
											}
										}
									r.historyTime = [], r.historyX = [], r.historyY = [], o && o.onTouchEnd && o.onTouchEnd(a.x, a.y, s)
								}
							}
						}
					}, {
						key: "updatePosition",
						value: function (t) {
							var e;
							t > 0 && (t = 0);
							var i = 10 * this._cwh(60) / f * v,
								n = 10 * this._cwh(60);
							this.canvasType != g.friendRank && this.canvasType != g.groupRank || (e = -(this._cy(143) + n / 2 - f / 2) / f * v), this.canvasType == g.pk && (e = -(this._cy(437) + n / 2 - f / 2) / f * v);
							var r = Math.floor((e - v * t / d) / i);
							if (this.lastN != r && this.lastN - r < 0) r % 2 == 0 ? this._drawList(10 * (r + 1), "list2") : this._drawList(10 * (r + 1), "list1");
							else if (this.lastN != r && this.lastN - r > 0) {
								var a = r; - 1 == a && (a = 1), r % 2 == 0 ? this._drawList(10 * r, "list1") : this._drawList(10 * a, "list2")
							}
							r % 2 == 0 ? (this.obj.list1.position.y = e - v * t / d - r * i, this.obj.list2.position.y = e - v * t / d - (r + 1) * i) : (this.obj.list2.position.y = e - v * t / d - r * i, this.obj.list1.position.y = e - v * t / d - (r + 1) * i), this.lastN = r, this.lastScrollY = t
						}
					}, {
						key: "_drawList",
						value: function (t, e) {
							var i = this;
							"list1" == e ? this.imgid.list1++ : "list2" == e && this.imgid.list2++;
							var n = this.sotedRankList.slice(t, t + 10),
								r = this.context[e];
							if (r.clearRect(0, 0, p, 10 * this._cwh(60)), r.fillStyle = "rgba(0,0,0,0.9)", this.canvasType == g.pk && (r.fillStyle = "white"), r.textBaseline = "middle", r.fillRect(0, 0, p, 10 * this._cwh(60)), 0 == t || 0 != n.length) {
								if (!(t < 0)) {
									for (var a = n.length, o = function () {
											i.canvasType != g.pk && s % 2 == 1 && (r.fillStyle = "rgba(255,255,255, 0.03)", r.fillRect(0, s * i._cwh(60), i._cwh(414), i._cwh(60)));
											var a = (s + .5) * i._cwh(60);
											r.textAlign = "center", h = s + 1 + t, r.fillStyle = 1 == h ? "rgb(250,126,0)" : 2 == h ? "rgb(254,193,30)" : 3 == h ? "rgb(251,212,19)" : "#aaa", r.font = "italic bold " + i._cf(17), r.fillText(h, i._cx(58.5), a);
											var o = i;
											n[s].grade;
											if (i._drawImageRound(n[s].headimg, i._cx(107), a, i._cwh(34), i._cwh(34), e, function () {
													o._drawImageCenter("res/ava_rank.png", o._cx(107), a, o._cwh(47), o._cwh(47), e, null, o.imgid[e])
												}, i.imgid[e], !0), i.canvasType == g.pk) {
												r.textAlign = "left", n[s].nickname = n[s].nickname || "";
												var l = n[s].nickname.substring(0, 12);
												n[s].nickname.length > 12 && (l += "..."), r.fillStyle = "#000", r.font = "bold " + i._cf(17), r.fillText(l, i._cx(144), a - i._cwh(10)), n[s].score_info[0].score > i.data.organizerInfo.score_info[0].score ? (r.font = i._cf(12), r.fillStyle = "#FC4814", r.fillText("挑战成功", i._cx(144), a + i._cwh(12)), r.fillStyle = "#000") : (r.font = i._cf(12), r.fillStyle = "#888", r.fillText("挑战失败", i._cx(144), a + i._cwh(12))), r.textAlign = "right", r.font = i._cf(22, !0), r.fillText(n[s].score_info[0].score || 0, i._cx(364), a)
											} else {
												r.textAlign = "left", r.fillStyle = "#fff", r.font = i._cf(17), n[s].nickname = n[s].nickname || "";
												var c = n[s].nickname.substring(0, 12);
												n[s].nickname.length > 12 && (c += "..."), r.fillText(c, i._cx(144), a), r.textAlign = "right", r.font = i._cf(22, !0), r.fillText(n[s].week_best_score || 0, i._cx(364), a)
											}
										}, s = 0; s < a; s++) {
										var h;
										o()
									}
									0 == a && (r.textAlign = "center", r.fillStyle = "#ccc", r.font = this._cf(14), this.canvasType == g.pk ? r.fillText("暂无人应战", this._cx(207), this._cwh(100)) : r.fillText("暂无排行数据", this._cx(207), this._cy(429))), this._updatePlane(e)
								}
							} else this._updatePlane(e)
						}
					}, {
						key: "renderRankList",
						value: function (t) {
							var e = [];
							this.myUserInfo = this.myUserInfo || {
								headimg: "",
								nickname: "",
								week_best_score: 0,
								score_info: [{
									score: 0
								}]
							}, this.canvasType == g.friendRank || this.canvasType == g.groupRank ? ((t = t || []).push(this.myUserInfo), e = this._rerank(t), this.sotedRankList = e) : this.sotedRankList = t;
							var i, n = this.sotedRankList.length * this._cwh(60) / c;
							this.canvasType != g.friendRank && this.canvasType != g.groupRank || (this.myidx = e.findIndex(this._findSelfIndex.bind(this)) + 1, i = this._cwh(445) / c), this.canvasType == g.pk && (i = this._cwh(194) / c), this.scrollHandler = new l.default({
								innerOffsetHeight: n,
								outterOffsetHeight: i,
								updatePosition: this.updatePosition.bind(this)
							}), this._drawList(0, "list1"), this._drawList(10, "list2")
						}
					}, {
						key: "_drawGameOverBtnClick",
						value: function () {
							this.context.btn.clearRect(this._cx(91), this._cy(567), this._cwh(232), this._cwh(94)), this._drawImageCenter("res/replay.png", this._cx(207), this._cy(607), this._cwh(190), this._cwh(75), "btn", null, this.imgid.btn)
						}
					}, {
						key: "_drawGameOverBtnClickRevert",
						value: function () {
							this.context.btn.clearRect(this._cx(91), this._cy(567), this._cwh(232), this._cwh(94)), this._drawImageCenter("res/replay.png", this._cx(207), this._cy(607), this._cwh(212), this._cwh(84), "btn", null, this.imgid.btn)
						}
					}, {
						key: "_drawStartClick",
						value: function () {
							this.context.btn.clearRect(this._cx(91), this._cy(547), this._cwh(232), this._cwh(94)), this._drawImageCenter("res/play.png", this._cx(207), this._cy(587), this._cwh(190), this._cwh(75), "btn", null, this.imgid.btn)
						}
					}, {
						key: "_drawStartClickRevert",
						value: function () {
							this.context.btn.clearRect(this._cx(91), this._cy(547), this._cwh(232), this._cwh(94)), this._drawImageCenter("res/play.png", this._cx(207), this._cy(587), this._cwh(212), this._cwh(84), "btn", null, this.imgid.btn)
						}
					}, {
						key: "_drawPKListBg",
						value: function () {
							var t = this.context.bg;
							t.clearRect(0, 0, p, f), t.fillStyle = "rgba(0,0,0, 0.8)", t.fillRect(0, 0, (p - this._cwh(354)) / 2, f), t.fillRect(this._cx(384), 0, (p - this._cwh(354)) / 2, f), t.fillRect(this._cx(30), 0, this._cwh(354), this._cy(110)), t.fillRect(this._cx(30), this._cy(632), this._cwh(354), this._cy(144)), t.fillStyle = "rgb(250,250,250)", t.fillRect(this._cx(31), this._cy(103), this._cwh(354), this._cwh(335)), t.lineWidth = 2 * c, t.strokeStyle = "#fff", this._roundedRectR(this._cx(30), this._cy(102), this._cwh(354), this._cwh(530), 1 * c, "bg"), t.textBaseline = "middle";
							s = this;
							if (void 0 == this.data.gg_score) this._drawImageCenter(this.data.organizerInfo.headimg, this._cx(207), this._cy(158), this._cwh(50), this._cwh(50), "bg", null, this.imgid.bg), t.textAlign = "center", t.fillStyle = "rgba(0,0,0,0.8)", t.font = this._cf(14), t.fillText(this.data.organizerInfo.nickname, this._cx(207), this._cy(195)), t.fillText("擂主得分", this._cx(207), this._cy(242)), t.lineWidth = .5 * c, t.strokeStyle = "rgba(0,0,0,0.06)", t.beginPath(), t.moveTo(this._cx(160), this._cy(217)), t.lineTo(this._cx(254), this._cy(217)), t.closePath(), t.stroke(), t.fillStyle = "rgba(0,0,0,0.2)", t.fillRect(this._cx(162), this._cy(239), this._cwh(9), this._cwh(3)), t.fillRect(this._cx(162), this._cy(244), this._cwh(9), this._cwh(3)), t.fillRect(this._cx(241), this._cy(239), this._cwh(9), this._cwh(3)), t.fillRect(this._cx(241), this._cy(244), this._cwh(9), this._cwh(3)), t.fillStyle = "#000", t.font = this._cf(66, !0), t.fillText(this.data.organizerInfo.score_info[0].score, this._cx(207), this._cy(298));
							else {
								var e = void 0,
									i = void 0,
									n = void 0,
									r = void 0;
								this.data.gg_score > this.data.organizerInfo.score_info[0].score ? (e = "res/suc.png", i = "挑战成功", n = "rgba(0,0,0,1)", r = "rgba(0,0,0,0.3)", this._drawImageCenter("res/flower_small.png", this._cx(207), this._cy(175), this._cwh(140), this._cwh(53), "bg", null, this.imgid.bg)) : (e = "res/fail.png", i = "挑战失败", n = "rgba(0,0,0,0.3)", r = "rgba(0,0,0,1)"), this._drawImageCenter(e, this._cx(207), this._cy(135), this._cwh(20), this._cwh(15), "bg", null, this.imgid.bg), t.textAlign = "center", t.fillStyle = "#000", t.font = "bold " + this._cf(30), t.fillText(i, this._cx(207), this._cy(178)), this._drawImageCenter(this.myUserInfo.headimg, this._cx(158), this._cy(289), this._cwh(26), this._cwh(26), "bg", null, this.imgid.bg), this._drawImageCenter(this.data.organizerInfo.headimg, this._cx(260), this._cy(289), this._cwh(26), this._cwh(26), "bg", null, this.imgid.bg), t.textAlign = "center", t.fillStyle = "rgba(0,0,0,0.8)", t.font = this._cf(11);
								var a = this.myUserInfo.nickname;
								a.length > 9 && (a = a.substring(0, 9) + "..."), t.fillText(a, this._cx(158), this._cy(318)), (a = this.data.organizerInfo.nickname).length > 9 && (a = a.substring(0, 9) + "..."), t.fillText(this.data.organizerInfo.nickname, this._cx(260), this._cy(318)), t.fillStyle = n, t.font = this._cf(44, !0), this.data.gg_score > 9999 ? (t.textAlign = "right", t.fillText(this.data.gg_score, this._cx(190), this._cy(253))) : (t.textAlign = "center", t.fillText(this.data.gg_score, this._cx(158), this._cy(253))), t.textAlign = "center", t.fillStyle = "rgba(0,0,0,0.3)", t.fillRect(this._cx(202), this._cy(242), this._cwh(10), this._cwh(4)), t.fillStyle = r, t.font = this._cf(44, !0), this.data.organizerInfo.score_info[0].score > 999 ? (t.textAlign = "left", t.fillText(this.data.organizerInfo.score_info[0].score, this._cx(231), this._cy(253))) : (t.textAlign = "center", t.fillText(this.data.organizerInfo.score_info[0].score, this._cx(260), this._cy(253)))
							}
							t.strokeStyle = "rgba(0,0,0,0.06)", t.lineWidth = 1, t.beginPath(), t.moveTo(this._cx(30), this._cy(437)), t.lineTo(this._cx(384), this._cy(437)), t.stroke(), t.closePath();
							var o = "挑战",
								s = this;
							if (this.data.organizerInfo.left_time > 0 && 0 == this.data.organizerInfo.is_self) {
								this.myidx > 0 && (o = "再次挑战"), this._drawImageCenter("res/btn_bg_g.png", this._cx(207), this._cy(368), this._cwh(130), this._cwh(63), "bg", function () {
									t.textAlign = "center", t.fillStyle = "#fff", t.font = s._cf(14), t.fillText(o, s._cx(207), s._cy(368)), s._updatePlane("bg")
								}, this.imgid.bg), t.font = this._cf(12), t.textAlign = "right", t.fillStyle = "#000", t.fillText("有效时间至", this._cx(223), this._cy(403.5)), t.textAlign = "left", t.fillStyle = "#fc4814";
								l = (h = +new Date) + 1e3 * this.data.organizerInfo.left_time;
								u = (u = (h = new Date(l)).getHours()) < 10 ? "0" + u : u;
								d = (d = h.getMinutes()) < 10 ? "0" + d : d, t.fillText(u + ":" + d, this._cx(225), this._cy(403.5))
							} else if (0 == this.data.organizerInfo.left_time && 0 == this.data.organizerInfo.is_self) {
								s = this;
								this._drawImageCenter("res/btn_bg_h.png", this._cx(207), this._cy(368), this._cwh(130), this._cwh(63), "bg", function () {
									t.font = s._cf(14), t.textAlign = "center", t.fillStyle = "rgba(0,0,0,0.3)", t.fillText("挑战结束", s._cx(207), s._cy(368)), s._updatePlane("bg")
								}, this.imgid.bg), t.font = this._cf(14), t.textAlign = "center", t.fillStyle = "#888", t.fillText("已失效", this._cx(207), this._cy(403.5))
							} else if (this.data.organizerInfo.left_time > 0 && 1 == this.data.organizerInfo.is_self) {
								t.font = this._cf(14), t.textAlign = "right", t.fillStyle = "#888", t.fillText("有效时间至", this._cx(223), this._cy(369)), t.textAlign = "left", t.fillStyle = "#2c9f67";
								var h = +new Date,
									l = h + 1e3 * this.data.organizerInfo.left_time,
									u = (h = new Date(l)).getHours();
								u = u < 10 ? "0" + u : u;
								var d = h.getMinutes();
								d = d < 10 ? "0" + d : d, t.fillText(u + ":" + d, this._cx(225), this._cy(369))
							}
							t.textAlign = "center", t.fillStyle = "#fff", t.font = this._cf(17), t.fillText("不挑战，直接开始", this._cx(199), this._cy(688)), this._drawImageCenter("res/r_arr.png", this._cx(280), this._cy(688), this._cwh(6.5), this._cwh(12.5), "bg", null, this.imgid.bg), this._updatePlane("bg")
						}
					}, {
						key: "_drawRankListBg",
						value: function () {
							this.imgid.bg++;
							var t = this.context.bg;
							if (t.clearRect(0, 0, p, f), t.fillStyle = "rgba(0,0,0, 0.8)", t.fillRect(0, 0, (p - this._cwh(354)) / 2, f), t.fillRect(this._cx(384), 0, (p - this._cwh(354)) / 2, f), t.fillRect(this._cx(30), 0, this._cwh(354), this._cy(110)), t.fillRect(this._cx(30), this._cy(592), this._cwh(354), this._cy(144)), t.textBaseline = "middle", t.textAlign = "center", t.fillStyle = "rgba(0,0,0,0.9)", t.fillRect(this._cx(30), this._cy(110), this._cwh(354), this._cwh(33)), t.strokeStyle = "rgba(255,255,255,0.2)", t.lineWidth = 1 * c, t.beginPath(), t.moveTo(this._cx(30), this._cy(143)), t.lineTo(this._cx(384), this._cy(143)), t.stroke(), t.closePath(), t.fillStyle = "#fff", t.font = "bold " + this._cf(12), t.textAlign = "left", t.fillText("每周一凌晨刷新", this._cx(54), this._cy(126.5)), t.lineWidth = 1 * c, t.strokeStyle = "rgba(255,255,255,0.2)", this._roundedRectR(this._cx(30), this._cy(110), this._cwh(354), this._cwh(482), 1 * c, "bg"), this._updatePlane("bg"), this.canvasType == g.groupRank) {
								var e = this;
								t.font = e._cf(17), t.fillStyle = "#fff", t.textAlign = "center", t.textBaseline = "middle", t.fillText("玩一局", e._cx(207), e._cy(680)), this._drawImageCenter("res/r_arr.png", this._cx(244), this._cy(680), this._cwh(6.6), this._cwh(10), "bg", null, this.imgid.bg)
							}
							this.canvasType == g.friendRank && (t.fillStyle = "#fff", t.font = this._cf(17), t.textAlign = "left", t.fillText("查看群排行", this._cx(177), this._cy(674)), this._drawImageCenter("res/r_arr.png", this._cx(270), this._cy(674), this._cwh(6.6), this._cwh(10), "bg", null, this.imgid.bg), this._drawImageCenter("res/rank.png", this._cx(154), this._cy(674), this._cwh(22), this._cwh(22), "bg", null, this.imgid.bg), this._drawImageCenter("res/close.png", this._cx(375), this._cy(114), this._cwh(48), this._cwh(48), "bg", null, this.imgid.bg))
						}
					}, {
						key: "_drawGameOver",
						value: function () {
							var t = this;
							this.imgid.bg;
							var e = this.opt;
							e.score = e.score || 0, e.highest_score = e.highest_score || 0;
							var i = this,
								n = this.context.bg;
							n.clearRect(0, 0, p, f), n.fillStyle = "rgba(0,0,0, 0.8)", n.fillRect(0, 0, p, f), n.textBaseline = "middle", n.textAlign = "center", n.fillStyle = "#fff", n.font = this._cf(14), n.fillText("本次得分", this._cx(207), this._cy(84)), n.fillStyle = "#fff", n.font = this._cf(88, !0), n.fillText(e.score, this._cx(212), this._cy(150)), n.fillStyle = "rgba(255,255,255,0.2)", n.fillRect(this._cx(162), this._cy(78), this._cwh(9), this._cwh(3)), n.fillRect(this._cx(162), this._cy(84), this._cwh(9), this._cwh(3)), n.fillRect(this._cx(241), this._cy(78), this._cwh(9), this._cwh(3)), n.fillRect(this._cx(241), this._cy(84), this._cwh(9), this._cwh(3)), this._drawImageCenter("res/btn.png", this._cx(207), this._cy(214), this._cwh(86), this._cwh(32), "bg", null, this.imgid.bg), n.font = this._cf(13), n.fillStyle = "#fff", n.fillText("发起挑战", this._cx(207), this._cy(214));
							var r = !1;
							if ((e.game_cnt > 5 || e.score > 5) && e.score < e.highest_score && 1 != this.myidx && !this._has_show_tired && +new Date / 1e3 - e.start_time > 1800 && (r = !0, this._has_show_tired = !0), r) n.lineWidth = 4 * c, n.strokeStyle = "#fff", n.fillStyle = "#fff", this._roundedRectR(this._cx(31), this._cy(298), this._cwh(354), this._cwh(210), 1 * c, "bg"), n.fill(), n.fillStyle = "black", n.font = this._cf(17), n.textAlign = "left", n.fillText("玩了这么久", this._cx(80), this._cy(370)), n.fillText("休息一下吧", this._cx(80), this._cy(410)), this._drawImageCenter("res/tired.png", this._cx(297), this._cy(397), this._cwh(179), this._cwh(185), "bg", null, i.imgid.bg), this.opt.type = "tired";
							else {
								n.lineWidth = .5 * c, n.fillStyle = "rgba(0,0,0,0.3)", n.strokeStyle = "rgba(255,255,255,0.3)", this._roundedRectR(this._cx(30), this._cy(297), this._cwh(354), this._cwh(192), 4 * c, "bg"), n.fill(), n.fillStyle = "rgba(255,255,255,0.06)", n.fillRect(this._cx(150), this._cy(336), this._cwh(115), this._cwh(153)), n.beginPath(), n.lineWidth = .5 * c, n.strokeStyle = "rgba(255,255,255,0.4)", n.moveTo(this._cx(30), this._cy(336)), n.lineTo(this._cx(384), this._cy(336)), n.stroke(), n.closePath(), n.font = this._cf(12), n.textAlign = "left", n.fillStyle = "rgba(255,255,255,0.6)", n.fillText("排行榜 · 每周一凌晨刷新", this._cx(46), this._cy(316)), n.fillStyle = "#fff", n.fillText("查看全部排行", this._cx(291), this._cy(316)), this._drawImageCenter("res/r_arr.png", this._cx(371), this._cy(315), this._cwh(6.6), this._cwh(10), "bg", null, this.imgid.bg);
								var a = this.myidx - 2,
									o = 0;
								1 == this.sotedRankList.length && (o = 1);
								for (var s = 0; s < 3; s++)
									if (n.font = "italic bold " + this._cf(16), n.textAlign = "center", 1 == this.myidx && 0 == s && a++, (this.myidx != this.sotedRankList.length || 2 != s) && (this.myidx == a + 1 + s ? n.fillStyle = "#41bf8c" : n.fillStyle = "#888", this.sotedRankList[a + s])) {
										! function () {
											n.fillText(a + 1 + s, t._cx(90 + 118 * (s + o)), t._cy(356)), n.font = t._cf(14), t.sotedRankList[a + s].nickname.length > 12 && (t.sotedRankList[a + s].nickname = t.sotedRankList[a + s].nickname.substring(0, 12) + "..."), n.fillStyle = "#888", n.fillText(t.sotedRankList[a + s].nickname, t._cx(90 + 118 * (s + o)), t._cy(435)), n.font = t._cf(22, !0), n.fillStyle = "#fff", n.fillText(t.sotedRankList[a + s].week_best_score || 0, t._cx(90 + 118 * (s + o)), t._cy(463)), i = t;
											var e = t._cx(90 + 118 * (s + o));
											t._drawImageRound(t.sotedRankList[a + s].headimg, e, t._cy(393), t._cwh(42), t._cwh(42), "bg", function () {
												i._drawImageCenter("res/ava_rank.png", e, i._cy(393), i._cwh(58), i._cwh(58), "bg", null, i.imgid.bg)
											}, t.imgid.bg, !0)
										}()
									}
							}
							h = this.context.btn;
							if (h.clearRect(0, 0, p, f), r) this._drawImageCenter("res/noplay.png", this._cx(207), this._cy(607), this._cwh(212), this._cwh(84), "btn", function () {
								h.fillStyle = "#00C777", h.textBaseline = "middle", h.font = i._cf(22), i.noplay_time = 5, h.fillText(i.noplay_time, i._cx(140), i._cy(607)), i._updatePlane("btn"), i.timer = setInterval(function () {
									i.noplay_time--, i.noplay_time <= 0 ? (clearInterval(i.timer), h.clearRect(0, 0, p, f), i._drawImageCenter("res/replay.png", i._cx(207), i._cy(607), i._cwh(212), i._cwh(84), "btn", null, i.imgid.btn)) : (h.fillStyle = "white", h.fillRect(i._cx(125), i._cy(590), i._cwh(30), i._cwh(30)), h.fillStyle = "#00C777", h.textBaseline = "middle", h.font = i._cf(22), h.fillText(i.noplay_time, i._cx(140), i._cy(607)), i._updatePlane("btn"))
								}, 1e3)
							}, this.imgid.btn);
							else {
								var h;
								(h = this.context.btn).clearRect(this._cx(91), this._cy(547), this._cwh(232), this._cwh(94)), this._drawImageCenter("res/replay.png", this._cx(207), this._cy(607), this._cwh(212), this._cwh(84), "btn", null, this.imgid.btn)
							}
							n.font = this._cf(14), n.textAlign = "center", n.fillStyle = "#fff", n.fillText("历史最高分：" + Math.max(e.highest_score, e.score), this._cx(207), this._cy(703)), this._updatePlane("bg")
						}
					}, {
						key: "_drawStart",
						value: function (t) {
							t = t || {};
							var e = this.context.bg;
							e.clearRect(0, 0, p, f), e.fillStyle = "rgba(0,0,0, 0.3)", e.fillRect(0, 0, p, f);
							this._drawImageCenter("res/title.png", this._cx(204), this._cy(168), this._cwh(207), this._cwh(52), "bg", null, this.imgid.bg);
							this.context.btn.clearRect(0, 0, p, f), this._drawImageCenter("res/play.png", this._cx(207), this._cy(587), this._cwh(208), this._cwh(78), "btn", null, this.imgid.btn), e.font = this._cf(17), e.textBaseline = "middle", e.textAlign = "center", e.fillStyle = "#fff", e.fillText("排行榜", this._cx(213.5), this._cy(684)), this._drawImageCenter("res/r_arr.png", this._cx(250), this._cy(684), this._cwh(6.6), this._cwh(10), "bg", null, this.imgid.bg), this._drawImageCenter("res/rank.png", this._cx(165), this._cy(684), this._cwh(22), this._cwh(22), "bg", null, this.imgid.bg), this._updatePlane("bg")
						}
					}, {
						key: "_drawLookers",
						value: function (t) {
							var e = this.context.bg;
							e.clearRect(0, 0, p, f);
							var i = this,
								n = t.score || 0,
								r = t.nickname || "";
							e.textAlign = "center", e.textBaseline = "middle", "in" == t.type ? (this._drawImageRound(t.headimg, this._cx(207), this._cy(91), this._cx(50), this._cx(50), "bg", function () {
								i._drawImageCenter("res/ava_lookers.png", i._cx(207), i._cy(91), i._cx(53), i._cx(53), "bg", null, i.imgid.bg)
							}, this.imgid.bg, !0), e.font = this._cf(17), e.fillStyle = "black", e.fillText(r + " 正在游戏中", this._cx(207), this._cy(144))) : "gg" == t.type ? (e.fillStyle = "rgba(0,0,0, 0.4)", e.fillRect(0, 0, p, f), this._drawImageRound(t.headimg, this._cx(207), this._cy(91), this._cwh(50), this._cwh(50), "bg", function () {
								i._drawImageCenter("res/ava_lookers.png", i._cx(207), i._cy(91), i._cwh(53), i._cwh(53), "bg", null, i.imgid.bg)
							}, this.imgid.bg, !0), e.fillStyle = "#fff", e.strokeStyle = "white", e.font = this._cf(17), e.fillText(r + " 游戏已结束", this._cx(207), this._cy(144)), e.lineWidth = .5 * c, e.strokeStyle = "rgba(255,255,255,0.5)", e.beginPath(), e.moveTo(this._cx(157), this._cy(176)), e.lineTo(this._cx(257), this._cy(176)), e.closePath(), e.stroke(), e.font = this._cf(14), e.fillText("游戏得分", this._cx(207), this._cy(207)), e.fillStyle = "rgba(255,255,255,0.2)", e.fillRect(this._cx(156), this._cy(203), this._cwh(9), this._cwh(3)), e.fillRect(this._cx(156), this._cy(209), this._cwh(9), this._cwh(3)), e.fillRect(this._cx(243), this._cy(203), this._cwh(9), this._cwh(3)), e.fillRect(this._cx(243), this._cy(209), this._cwh(9), this._cwh(3)), e.fillStyle = "#fff", e.font = this._cf(80, !0), e.fillText(n || 0, this._cx(212), this._cy(267))) : "out" == t.type && (e.fillStyle = "rgba(0,0,0, 0.4)", e.fillRect(0, 0, p, f), this._drawImageRound(t.headimg, this._cx(207), this._cy(221), this._cwh(50), this._cwh(50), "bg", function () {
								i._drawImageCenter("res/ava_lookers.png", i._cx(207), i._cy(221), i._cwh(53), i._cwh(53), "bg", null, i.imgid.bg)
							}, this.imgid.bg, !0), e.fillStyle = "#fff", e.font = this._cf(17), e.fillText(r + " 游戏已结束", this._cx(207), this._cy(278)));
							i = this;
							this._drawImageCenter("res/btn_iplay.png", this._cx(207), this._cy(663), this._cwh(131), this._cwh(54), "bg", null, this.imgid.bg), this._updatePlane("bg")
						}
					}, {
						key: "_drawGameOverHighest",
						value: function (t, e) {
							this.imgid.bg++, t.score = t.score || 0;
							var i = this.context.bg;
							i.clearRect(0, 0, p, f), i.fillStyle = "rgba(0,0,0, 0.8)", i.fillRect(0, 0, p, f);
							o = this.context.btn;
							if (o.clearRect(this._cx(30), this._cy(448), this._cwh(354), this._cwh(55)), i.font = this._cf(14), i.textAlign = "center", i.fillStyle = "#fff", i.fillText("历史最高分：" + Math.max(t.highest_score, t.score), this._cx(207), this._cy(703)), "history" == e) {
								0 == this.changlleList.length ? (i.lineWidth = 2 * c, i.strokeStyle = "rgba(255,255,255,0.06)", i.fillStyle = "rgba(0,0,0,0.6)", this._roundedRectR(this._cx(30), this._cy(104), this._cwh(354), this._cwh(371), 4 * c, "bg"), i.fill(), this._drawImageCenter("res/pure_share.png", this._cx(207), this._cy(440), this._cwh(18), this._cwh(24), "bg", null, this.imgid.bg)) : (i.lineWidth = 2 * c, i.strokeStyle = "rgba(255,255,255,0.06)", i.fillStyle = "rgba(0,0,0,0.6)", this._roundedRectR(this._cx(30), this._cy(104), this._cwh(354), this._cwh(401), 4 * c, "bg"), i.fill(), i.lineWidth = .5 * c, i.strokeStyle = "rgba(255,255,255,0.2)", i.beginPath(), i.moveTo(this._cx(127), this._cy(406)), i.lineTo(this._cx(287), this._cy(406)), i.stroke(), i.closePath(), i.font = this._cf(14), i.fillStyle = "#fff", i.fillText("排名新超越" + this.changlleList.length + "位好友", this._cx(207), this._cy(429)), this.changlleListStart = 0, this._reDrawChangeAva(0), this._drawImageCenter("res/pure_share.png", this._cx(207), this._cy(368), this._cwh(18), this._cwh(24), "bg", null, this.imgid.bg));
								var n = "",
									r = "";
								"历史最高分" == this.opt.msg && (this.opt.highest_score < 100 && this.opt.score >= 100 && (n = "初窥门径", r = "#509FC9"), this.opt.highest_score < 500 && this.opt.score >= 500 && (n = "耐得寂寞", r = "#E67600"), this.opt.highest_score < 1e3 && this.opt.score >= 1e3 && (n = "登堂入室", r = "#009D5E"), this.opt.highest_score < 2e3 && this.opt.score >= 2e3 && (n = "无聊大师", r = "#7A0096"), this.opt.highest_score < 3e3 && this.opt.score >= 3e3 && (n = "一指禅", r = "#555555"), this.opt.highest_score < 5e3 && this.opt.score >= 5e3 && (n = "立地成佛", r = "#AC8742")), n ? (i.fillStyle = r, i.strokeStyle = r, i.lineWidth = 1 * c, this._roundedRectR(this._cx(167), this._cy(154), this._cwh(80), this._cwh(26), 2 * c, "bg"), i.fill(), i.fillStyle = "white", i.textAlign = "center", i.textBaseline = "middle", i.font = "bold " + this._cf(14), i.fillText(n, this._cx(207), this._cy(167))) : this._drawImageCenter("res/new.png", this._cx(207), this._cy(167), this._cwh(58), this._cwh(26), "bg", null, this.imgid.bg), i.font = this._cf(14), i.textAlign = "center", i.fillStyle = "#fff", i.textBaseline = "middle", i.fillText(this.opt.msg || "本周最高分", this._cx(207), this._cy(224)), i.font = this._cf(86, !0), i.fillStyle = "#00c777", i.fillText(t.score, this._cx(207), this._cy(292.5))
							}
							if ("rank" == e) {
								this._drawImageCenter("res/new.png", this._cx(207), this._cy(167), this._cwh(58), this._cwh(26), "bg", null, this.imgid.bg), i.lineWidth = 2 * c, i.strokeStyle = "rgba(255,255,255,0.06)", i.fillStyle = "rgba(0,0,0,0.6)", this._roundedRectR(this._cx(30), this._cy(104), this._cwh(354), this._cwh(371), 4 * c, "bg"), i.fill();
								var a = this;
								this._drawImageRound(this.myUserInfo.headimg, this._cx(207), this._cy(291), this._cwh(56), this._cwh(56), "bg", function () {
									a._drawImageCenter("res/gold.png", a._cx(207), a._cy(253), a._cwh(40), a._cwh(40), "bg", null, a.imgid.bg)
								}, this.imgid.bg), i.font = this._cf(14), i.textAlign = "center", i.fillStyle = "#fff", i.textBaseline = "middle", i.fillText("排行榜冠军", this._cx(207), this._cy(224)), i.font = this._cf(40, !0), i.fillStyle = "#00c777", i.fillText(t.score, this._cx(207), this._cy(349)), this._drawImageCenter("res/pure_share.png", this._cx(207), this._cy(415), this._cwh(18), this._cwh(24), "bg", null, this.imgid.bg)
							}
							i.fillStyle = "rgba(255,255,255,0.2)", i.fillRect(this._cx(155), this._cy(218.5), this._cwh(9), this._cwh(3)), i.fillRect(this._cx(155), this._cy(224.5), this._cwh(9), this._cwh(3)), i.fillRect(this._cx(248), this._cy(218.5), this._cwh(9), this._cwh(3)), i.fillRect(this._cx(248), this._cy(224.5), this._cwh(9), this._cwh(3)), this._drawImageCenter("res/close.png", this._cx(375), this._cy(112), this._cwh(43), this._cwh(43), "bg", null, this.imgid.bg);
							var o;
							(o = this.context.btn).clearRect(this._cx(91), this._cy(547), this._cwh(232), this._cwh(94)), this._drawImageCenter("res/replay.png", this._cx(207), this._cy(607), this._cwh(212), this._cwh(84), "btn", null, this.imgid.btn), this._drawImageCenter("res/flower.png", this._cx(207), this._cy(290), this._cwh(260), this._cwh(141), "bg", null, this.imgid.bg), this._updatePlane("bg")
						}
					}, {
						key: "_reDrawChangeAva",
						value: function (t) {
							var e = this;
							if (this.imgid.btn++, !(this.changlleListStart + 5 * t < 0 || this.changlleListStart + 5 * t > this.changlleList.length)) {
								this.changlleListStart = this.changlleListStart + 5 * t;
								var i = this.changlleList.slice(this.changlleListStart, this.changlleListStart + 5),
									n = i.length,
									r = 32,
									a = 207 - (32 * n + 10 * (n - 1)) / 2;
								this.context.btn.clearRect(this._cx(30), this._cy(448), this._cwh(354), this._cwh(55));
								for (var o = function () {
										var t = e._cx(a + 16 + 42 * s);
										h = e, e._drawImageRound(i[s].headimg, t, e._cy(469), e._cwh(r), e._cwh(r), "btn", function () {
											h._drawImageCenter("res/ava_rank.png", t, h._cy(469), h._cwh(46), h._cwh(46), "btn", null, h.imgid.btn)
										}, e.imgid.btn, !0)
									}, s = 0; s < n; s++) {
									var h;
									o()
								}
								this.changlleList.length > 5 && this.changlleListStart != 5 * Math.floor(this.changlleList.length / 5) && this._drawImageCenter("res/r_arr1.png", this._cx(339), this._cy(469), this._cwh(6), this._cwh(8), "btn", null, this.imgid.btn), this.changlleList.length > 5 && 0 != this.changlleListStart && this._drawImageCenter("res/l_arr.png", this._cx(69), this._cy(469), this._cwh(6), this._cwh(8), "btn", null, this.imgid.btn)
							}
						}
					}, {
						key: "_drawBeginner",
						value: function () {
							var t = this.context.bg;
							t.clearRect(0, 0, p, f), t.fillStyle = "rgba(255,255,255,0.3)", t.fillRect(this._cx(103), this._cy(134), this._cwh(206), this._cwh(115)), t.fillStyle = "black", t.textBaseline = "middle", t.textAlign = "center", t.font = this._cf(17), t.fillText("长按屏幕并释放", this._cx(207), this._cy(172)), t.textAlign = "left", t.fillText("控制", this._cx(149), this._cy(213)), t.textAlign = "right", t.fillText("向前跳", this._cx(265), this._cy(213)), this._drawImageCenter("res/i.png", this._cx(198), this._cy(211), this._cwh(13.2), this._cwh(35.6), "bg", null, this.imgid.bg), this._updatePlane("bg")
						}
					}, {
						key: "_createPlane",
						value: function () {
							if (!this.canvas.bg) {
								for (var t = 0; t < m.length; t++) this.canvas[m[t]] = document.createElement("canvas"), this.context[m[t]] = this.canvas[m[t]].getContext("2d"), this.canvas[m[t]].width = p, "list1" == m[t] || "list2" == m[t] ? this.canvas[m[t]].height = 10 * this._cwh(60) : this.canvas[m[t]].height = f, this.texture[m[t]] = new a.Texture(this.canvas[m[t]]), this.material[m[t]] = new a.MeshBasicMaterial({
									map: this.texture[m[t]],
									transparent: !0
								}), "list1" == m[t] || "list2" == m[t] ? this.geometry[m[t]] = new a.PlaneGeometry(y, 10 * this._cwh(60) / f * v) : this.geometry[m[t]] = new a.PlaneGeometry(y, v), this.obj[m[t]] = new a.Mesh(this.geometry[m[t]], this.material[m[t]]), this.material[m[t]].map.minFilter = a.LinearFilter, this.obj[m[t]].position.y = 0, this.obj[m[t]].position.x = 0, this.obj[m[t]].position.z = 9 - .001 * t
							}
						}
					}, {
						key: "_updatePlane",
						value: function (t) {
							this.showState && (this.canvasType == g.gameOver && "bg" != t && "btn" != t && "sample" != t || this.canvasType == g.start && "bg" != t && "btn" != t && "sample" != t || (this.texture[t].needsUpdate = !0, this.obj[t].visible = !0, this.options.camera.add(this.obj[t])))
						}
					}, {
						key: "_updateClip",
						value: function () {
							var t = this.p0.clone(),
								e = this.p1.clone(),
								i = this.p2.clone(),
								n = this.p3.clone(),
								r = this.p4.clone();
							this.canvasType == g.pk && (e = this.p5.clone(), i = this.p6.clone(), n = this.p7.clone(), r = this.p8.clone()), this.options.camera.updateMatrixWorld();
							var o = this.options.camera.matrixWorld;
							t.applyMatrix4(o), e.applyMatrix4(o), i.applyMatrix4(o), n.applyMatrix4(o), r.applyMatrix4(o);
							var s = new a.Triangle(i, e),
								h = s.plane();
							this._negatePlane(h, t.clone());
							var l = (s = new a.Triangle(n, i)).plane();
							this._negatePlane(l, t.clone());
							var c = (s = new a.Triangle(r, n)).plane();
							this._negatePlane(c, t.clone());
							var u = (s = new a.Triangle(e, r)).plane();
							this._negatePlane(u, t.clone()), this.material.list1.clippingPlanes = [h, l, c, u], this.material.list1.needsUpdate = !0, this.material.list2.clippingPlanes = [h, l, c, u], this.material.list2.needsUpdate = !0
						}
					}, {
						key: "_cwh",
						value: function (t) {
							var e = t * u / 414;
							return d / u < 736 / 414 && (e = t * d / 736), e * c
						}
					}, {
						key: "_cx",
						value: function (t) {
							var e = t * u / 414;
							return d / u < 736 / 414 && (e = t * d / 736 + (u - 414 * d / 736) / 2), e * c
						}
					}, {
						key: "_cy",
						value: function (t) {
							return (d / u > 736 / 414 ? t * u / 414 + (d - 736 * u / 414) / 2 : t * d / 736) * c
						}
					}, {
						key: "_cf",
						value: function (t, e) {
							var i = t * c * u / 414;
							return d / u < 736 / 414 && (i = t * c * d / 736), e && x ? i + "px " + x : i + "px Helvetica"
						}
					}, {
						key: "_cxp",
						value: function (t) {
							return t / u * 414
						}
					}, {
						key: "_cyp",
						value: function (t) {
							return d / u > 736 / 414 ? (t - (d - 736 * u / 414) / 2) / u * 414 : t / d * 736
						}
					}, {
						key: "_negatePlane",
						value: function (t, e) {
							if (t && e) {
								t.distanceToPoint(e) < 0 && t.negate()
							}
						}
					}, {
						key: "_drawImageCenter",
						value: function (t, e, i, n, r, a, o, s, h) {
							"/0" != t && "/96" != t && "/64" != t && t || (t = "res/ava.png");
							var l = new Image,
								c = this;
							l.onload = function () {
								c.imgid[a] == s && (c.context[a].drawImage(l, e - n / 2, i - r / 2, n, r), !!o && o(), h || c._updatePlane(a))
							}, l.onerror = function () {
								!!o && o()
							}, l.src = t
						}
					}, {
						key: "_drawImageRound",
						value: function (t, e, i, n, r, a, o, s, h) {
							"/0" != t && "/96" != t && "/64" != t && t || (t = "res/ava.png");
							var l = new Image,
								c = this,
								u = this.context[a];
							this.canvas[a];
							l.onload = function () {
								c.imgid[a] == s && (u.save(), c._roundedRectR(e - n / 2, i - r / 2, n, r, 2, a), u.clip(), u.drawImage(l, e - n / 2, i - r / 2, n, r), u.closePath(), u.restore(), !!o && o(), h || c._updatePlane(a))
							}, l.onerror = function () {
								!!o && o()
							}, l.src = t
						}
					}, {
						key: "_rerank",
						value: function (t) {
							for (var e, i, n = 0, r = t.length; n < r; n++)
								for (e = 0; e < r; e++) t[n].week_best_score > t[e].week_best_score && (i = t[e], t[e] = t[n], t[n] = i);
							return t
						}
					}, {
						key: "_findSelfIndex",
						value: function (t, e, i) {
							return t.nickname === this.myUserInfo.nickname
						}
					}, {
						key: "_findPartner",
						value: function (t, e, i) {
							return 1 === t.is_self
						}
					}, {
						key: "_roundedRectR",
						value: function (t, e, i, n, r, a) {
							var o = this.context[a];
							o.beginPath(), o.moveTo(t, e + r - 1), o.lineTo(t, e + n - r), o.quadraticCurveTo(t, e + n, t + r, e + n), o.lineTo(t + i - r, e + n), o.quadraticCurveTo(t + i, e + n, t + i, e + n - r), o.lineTo(t + i, e + r), o.quadraticCurveTo(t + i, e, t + i - r, e), o.lineTo(t + r, e), o.quadraticCurveTo(t, e, t, e + r), o.stroke(), o.closePath()
						}
					}, {
						key: "explode",
						value: function (t, e, i) {
							if (!this.particles[i]) {
								var n = [46833, 1573119, 16711680, 16711424, 65280];
								this.materials = [];
								for (var r = new a.PlaneGeometry(.4, .4), o = 0; o < n.length; ++o) this.materials.push(new a.MeshBasicMaterial({
									color: n[o],
									transparent: !0
								}));
								this.particles[i] = [];
								for (o = 0; o < 25; ++o) {
									var h = new a.Mesh(r, this.materials[o % n.length]);
									this.options.camera.add(h), this.particles[i].push(h)
								}
							}
							for (o = 0; o < this.particles[i].length; ++o) {
								var l = t,
									c = e;
								this.particles[i][o].position.set(l, c, 9.9);
								var u = 5 * (1 - 2 * Math.random()) + l,
									d = 5 * (1 - 2 * Math.random()) + c,
									f = l + .95 * (u - l),
									p = c + .95 * (d - c);
								s.customAnimation.to(this.particles[i][o].position, .35, {
									x: f,
									y: p
								}), s.customAnimation.to(this.particles[i][o].position, .35, {
									x: u,
									y: d,
									delay: .35
								})
							}
						}
					}, {
						key: "showFinger",
						value: function () {}
					}, {
						key: "clearFinger",
						value: function () {
							this.fingerTimer && (clearTimeout(this.fingerTimer), this.fingerTimer = null), this.opts.camera.remove(this.hand)
						}
					}]), t
				}();
			e.default = _
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				a = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t);
						var i = new r.MeshBasicMaterial({
								color: 32960
							}),
							n = new r.Mesh(new r.PlaneGeometry(5, 5), i),
							a = n.clone(),
							o = n.clone();
						a.position.set(0, -20, -1), n.position.set(-10, -20, -1), o.position.set(10, -20, -1), this.ui = [a, n, o], this.camera = e
					}
					return n(t, [{
						key: "show",
						value: function () {
							var t = this;
							this.ui.forEach(function (e) {
								t.camera.add(e)
							})
						}
					}, {
						key: "hide",
						value: function () {
							var t = this;
							this.ui.forEach(function (e) {
								t.camera.remove(e)
							})
						}
					}]), t
				}();
			e.default = a
		}, function (t, e, i) {
			"use strict";

			function n(t, e, i, n, r, a) {
				return t.moveTo(e, i + a), t.lineTo(e, i + r - a), t.quadraticCurveTo(e, i + r, e + a, i + r), t.lineTo(e + n - a, i + r), t.quadraticCurveTo(e + n, i + r, e + n, i + r - a), t.lineTo(e + n, i + a), t.quadraticCurveTo(e + n, i, e + n - a, i), t.lineTo(e + a, i), t.quadraticCurveTo(e, i, e, i + a), t
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				o = (i(1), function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(7))),
				s = i(3),
				h = 1.3,
				l = h / 20 * 21,
				c = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.seed = 0, this.startDist = 0, this.hitPoint = {
							uuid: "",
							ready: !1,
							texture: null
						}, this.loader = new a.TextureLoader, this.text = new o.default("超越！", {
							fillStyle: 2434341,
							chinese: !0,
							textAlign: "center"
						});
						var i = new a.Shape;
						i = n(i, -l, -l, 2 * l, 2 * l, .5);
						var r = new a.Shape;
						r = n(r, -h, -h, 2 * h, 2 * h, .5);
						var s = new a.ShapeGeometry(r);
						! function (t) {
							t.computeBoundingBox();
							var e = t.boundingBox.max,
								i = t.boundingBox.min,
								n = new a.Vector2(0 - i.x, 0 - i.y),
								r = new a.Vector2(e.x - i.x, e.y - i.y),
								o = t.faces;
							t.faceVertexUvs[0] = [];
							for (var s = 0; s < o.length; s++) {
								var h = t.vertices[o[s].a],
									l = t.vertices[o[s].b],
									c = t.vertices[o[s].c];
								t.faceVertexUvs[0].push([new a.Vector2((h.x + n.x) / r.x, (h.y + n.y) / r.y), new a.Vector2((l.x + n.x) / r.x, (l.y + n.y) / r.y), new a.Vector2((c.x + n.x) / r.x, (c.y + n.y) / r.y)])
							}
							t.uvsNeedUpdate = !0
						}(s), this.avatorFrame = new a.Mesh(s, new a.MeshBasicMaterial({
							transparent: !0,
							opacity: 1
						})), this.avatorOuter = new a.Mesh(new a.ShapeGeometry(i), new a.MeshBasicMaterial({
							color: 16777215,
							transparent: !0,
							opacity: 1
						})), this.text.obj.scale.set(.8, .8, .8), this.text.obj.position.set(0, 2.2, .1), this.avatorFrame.position.set(0, 0, .1), this.avatorFrame.material.opacity = 0, this.avatorOuter.position.set(0, 0, 0), this.avatorOuter.material.opacity = 0, this.text.material.opacity = 0, this.obj = new a.Object3D, this.text.obj.visible = !1, this.obj.add(this.avatorOuter), this.obj.add(this.avatorFrame), this.obj.add(this.text.obj), this.obj.rotateY(-Math.PI / 4), this.obj.rotateX(-Math.PI / 16 * 3), this.game.scene.add(this.obj), this.obj.visible = !1
					}
					return r(t, [{
						key: "update",
						value: function () {
							this.game.gameModel.friendsScore && this.game.gameModel.friendsScore.length && (this.seed++, this.hitPoint.uuid == this.game.currentBlock.obj.uuid && this.hitPoint.ready && this.hitPoint.texture && (this.startDist < 2 && (this.startDist++, this.text.obj.visible = !0), this.playAnimate(), this.seed = 0), this.seed >= 5 && this.checkScore())
						}
					}, {
						key: "checkScore",
						value: function () {
							var t = this.game.UI.score,
								e = this.game.gameModel.friendsScore;
							try {
								for (var i = 0; i < e.length; i++)
									if (e[i].week_best_score == t) {
										this.hitPoint.uuid = this.game.nextBlock.obj.uuid, this.hitPoint.ready = !1, this.animateAvator(e[i]);
										break
									}
							} catch (t) {
								console.log("RankSystem checkScore err:", t)
							}
						}
					}, {
						key: "animateAvator",
						value: function (t) {
							var e = this;
							this.loader.load(t.headimg, function (t) {
								e.hitPoint.uuid == e.game.nextBlock.obj.uuid && (e.hitPoint.ready = !0, t.minFilter = a.LinearFilter, e.hitPoint.texture = t)
							})
						}
					}, {
						key: "playAnimate",
						value: function () {
							var t = this;
							this.game.bottle.changeScorePos(3);
							var e = this.game.bottle.obj.position.clone(),
								i = e.x,
								n = e.z;
							this.obj.position.set(i, 10, n), this.avatorFrame.material.map = this.hitPoint.texture, this.obj.visible = !0, s.customAnimation.to(this.obj.position, .4, {
								y: 13
							}), s.customAnimation.to(this.text.material, .4, {
								opacity: 1
							}), s.customAnimation.to(this.avatorOuter.material, .4, {
								opacity: 1
							}), s.customAnimation.to(this.avatorFrame.material, .4, {
								opacity: 1
							}), s.customAnimation.to(this.text.material, .4, {
								opacity: 0,
								delay: .6,
								onComplete: function () {
									t.resetAvator(), t.game.bottle.changeScorePos(0)
								}
							}), s.customAnimation.to(this.avatorOuter.material, .4, {
								opacity: 0,
								delay: .6
							}), s.customAnimation.to(this.avatorFrame.material, .4, {
								opacity: 0,
								delay: .6
							}), this.hitPoint.uuid = "", this.hitPoint.ready = !1, this.hitPoint.texture = null
						}
					}, {
						key: "resetAvator",
						value: function () {
							this.obj.visible = !1, this.text.obj.visible = !1, this.avatorFrame.material.opacity = 0, this.avatorFrame.material.map = "", this.avatorOuter.material.opacity = 0, this.text.material.opacity = 0
						}
					}, {
						key: "reset",
						value: function () {
							this.seed = 0, this.seed = 0, this.startDist = 0, this.startDist = 0, this.hitPoint = {
								uuid: "",
								ready: !1,
								texture: null
							}, this.obj.visible = !1
						}
					}]), t
				}();
			e.default = c
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(4)),
				o = n(i(2)),
				s = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.times = a.default.getHistoryTimes(), this.times || (this.times = {
							accurate: 0,
							bonus: 0
						}), this.game = e, this.limitScore = 5
					}
					return r(t, [{
						key: "verifyScore",
						value: function (t) {
							t >= this.times.accurate ? (this.times.accurate = t, this.times.bonus >= this.limitScore ? this.upLoadHistoryTimes() : a.default.saveHistoryTimes(this.times)) : this.upLoadHistoryTimes()
						}
					}, {
						key: "addOne",
						value: function () {
							this.times.bonus++
						}
					}, {
						key: "checkUp",
						value: function () {
							this.times.bonus >= this.limitScore ? this.upLoadHistoryTimes() : a.default.saveHistoryTimes(this.times)
						}
					}, {
						key: "upLoadHistoryTimes",
						value: function () {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
								e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
								i = this.times.accurate + this.times.bonus;
							o.default.requestSettlement(t, i, this.afterUpload.bind(this), e)
						}
					}, {
						key: "afterUpload",
						value: function (t) {
							t && (this.times.accurate += this.times.bonus, this.times.bonus = 0), a.default.saveHistoryTimes(this.times)
						}
					}, {
						key: "getTimes",
						value: function () {
							return this.times.accurate + this.times.bonus
						}
					}]), t
				}();
			e.default = s
		}, function (t, e, i) {
			"use strict";

			function n(t, e) {
				if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				o = {
					duration: 100,
					height: 2,
					width: .5,
					distance: .5
				},
				s = function () {
					function t(e, i) {
						n(this, t), this.scene = e, this.bottle = i, this.tailsRemainPool = [], this.tailsUsingPool = [], this.lastDotPosition = this.bottle.obj.position.clone(), this.nowPosition = this.bottle.obj.position.clone(), this.distance = o.distance, this.init()
					}
					return r(t, [{
						key: "init",
						value: function () {
							var t = o.width,
								e = o.height;
							this.geometry = new a.PlaneGeometry(t, e), this.material = new a.MeshBasicMaterial({
								color: 16777215,
								side: a.DoubleSide,
								transparent: !0,
								opacity: .3
							});
							for (var i = 0; i < 20; i++) {
								var n = new h(this.geometry, this.material);
								this.scene.add(n.mesh), this.tailsRemainPool.push(n)
							}
						}
					}, {
						key: "update",
						value: function (t) {
							if (this.updateActiveCell(t), "prepare" == this.bottle.status && (this.nowPosition = this.bottle.obj.position.clone(), this.lastDotPosition = this.bottle.obj.position.clone()), "jump" == this.bottle.status) {
								var e = void 0;
								if (this.nowPosition = this.bottle.obj.position.clone(), (e = this.nowPosition.clone().distanceTo(this.lastDotPosition.clone())) < 5) {
									if (e >= this.distance)
										for (var i = e / this.distance, n = Math.floor(i), r = this.lastDotPosition.clone(), a = this.nowPosition.clone(), s = t / o.duration, h = 1; h <= n; h++) {
											a = this.lastDotPosition.clone().lerp(this.nowPosition.clone(), h / i);
											var l = 1 + s * (h / i - 1);
											l = l <= 0 ? 0 : l, this.layEgg(r.clone(), a.clone(), l), r = a.clone(), h == n && (this.lastDotPosition = a.clone())
										}
								} else this.lastDotPosition = this.nowPosition.clone()
							}
						}
					}, {
						key: "updateActiveCell",
						value: function (t) {
							for (var e = this.tailsUsingPool, i = 1 / o.duration, n = (o.duration, 0); n < e.length; n++) {
								e[n].tickTime += t;
								var r = e[n].mesh.scale.y - i * t;
								if (r > 0) {
									if (e[n].mesh.scale.y = r > 0 ? r : 0, e[n].tickTime >= o.duration) {
										e[n].reset();
										var a = e.shift();
										this.tailsRemainPool.push(a), n--
									}
								} else {
									e[n].reset();
									var s = e.shift();
									this.tailsRemainPool.push(s), n--
								}
							}
						}
					}, {
						key: "correctPosition",
						value: function () {
							this.lastDotPosition = this.bottle.obj.position.clone()
						}
					}, {
						key: "layEgg",
						value: function (t, e) {
							var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1,
								n = this.getMesh();
							this.tailsUsingPool.push(n), n.mesh.position.set(e.x, e.y, e.z), n.mesh.scale.y = i, n.mesh.lookAt(t), n.mesh.rotateY(Math.PI / 2), n.mesh.visible = !0
						}
					}, {
						key: "getMesh",
						value: function () {
							var t = this.tailsRemainPool.shift();
							return t || (t = new h(this.geometry, this.material), this.scene.add(t.mesh)), t
						}
					}, {
						key: "allReset",
						value: function () {
							this.tailsRemainPool.forEach(function (t) {
								t.reset()
							})
						}
					}]), t
				}();
			e.default = s;
			var h = function () {
				function t(e, i) {
					n(this, t), this.tickTime = 0, this.mesh = new a.Mesh(e, i), this.mesh.visible = !1, this.mesh.name = "tail"
				}
				return r(t, [{
					key: "reset",
					value: function () {
						this.tickTime = 0, this.mesh.scale.set(1, 1, 1), this.mesh.visible = !1
					}
				}]), t
			}()
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				a = i(1),
				o = (i(3), function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(7))),
				s = window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth,
				h = (window.innerHeight < window.innerWidth ? window.innerHeight : window.innerWidth) / s,
				l = function () {
					function t(e, i, n, s) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t);
						this.game = s, this.full2D = n, this.scene = e, this.camera = i, this.score = 0, this.double = 1;
						new r.PlaneGeometry(a.FRUSTUMSIZE * h * .034, a.FRUSTUMSIZE * h * .034 / 42 * 48), new r.MeshBasicMaterial({
							map: a.loader.load("res/observShare.png"),
							transparent: !0
						});
						this.scoreText = new o.default("0", {
							fillStyle: 2434341,
							sumScore: !0,
							opacity: .8
						}), this.scoreText.obj.position.set(0, 21, -10), this.scoreText.obj.updateMatrix(), this.scoreText.obj.matrixAutoUpdate = !1, this.camera.add(this.scoreText.obj), this.quickText = new o.default("好快！", {
							fillStyle: 2434341,
							chinese: !0
						}), this.quickText.obj.position.set(-13, 18, -10), this.quickText.obj.updateMatrix(), this.quickText.obj.matrixAutoUpdate = !1, this.quickText.obj.visible = !1, this.perfectText = new o.default("很好！", {
							fillStyle: 2434341,
							chinese: !0
						}), this.perfectText.obj.position.set(-13, 16, -10), this.perfectText.obj.updateMatrix(), this.perfectText.obj.matrixAutoUpdate = !1, this.perfectText.obj.visible = !1, this.camera.add(this.quickText.obj), this.camera.add(this.perfectText.obj)
					}
					return n(t, [{
						key: "reset",
						value: function () {
							this.scoreText.setScore(0), this.score = 0, this.double = 1, this.perfectText.obj.visible = !1, this.quickText.obj.visible = !1
						}
					}, {
						key: "update",
						value: function () {}
					}, {
						key: "hideScore",
						value: function () {
							this.scoreText.obj.visible = !1
						}
					}, {
						key: "showScore",
						value: function () {
							this.scoreText.obj.visible = !0
						}
					}, {
						key: "addScore",
						value: function (t, e, i) {
							e ? 1 === this.double ? this.double = 2 : this.double += 2 : this.double = 1, i && this.double <= 2 && (this.double *= 2), this.double = Math.min(32, this.double), t *= this.double, this.score += t, this.setScore(this.score)
						}
					}, {
						key: "setScore",
						value: function (t) {
							this.scoreText.setScore(t), a.BLOCK.minRadiusScale -= .005, a.BLOCK.minRadiusScale = Math.max(.25, a.BLOCK.minRadiusScale), a.BLOCK.maxRadiusScale -= .005, a.BLOCK.maxRadiusScale = Math.max(a.BLOCK.maxRadiusScale, .6), a.BLOCK.maxDistance += .03, a.BLOCK.maxDistance = Math.min(22, a.BLOCK.maxDistance)
						}
					}]), t
				}();
			e.default = l
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = i(1),
				a = function () {
					function t() {
						var e = this;
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.musicPool = ["success", "combo1", "combo2", "combo3", "combo4", "combo5", "combo6", "combo7", "combo8", "scale_intro", "scale_loop", "restart", "fall", "fall_2", "pop", "icon", "sing", "store", "water"], this.musicPool.forEach(function (t) {
							e[t] = wx.createInnerAudioContext(), e[t].src = r.AUDIO[t]
						}), this.scale_loop.loop = !0, this.store.onPlay(function () {
							e.store.before && e.store.before()
						}), this.store.onEnded(function () {
							e.store.after && e.store.after(), e.timer = setTimeout(function () {
								e.store.seek(0), e.store.play()
							}, 3e3)
						}), this.sing.onEnded(function () {
							e.timer = setTimeout(function () {
								e.sing.seek(0), e.sing.play()
							}, 3e3)
						}), this.water.onEnded(function () {
							e.timer = setTimeout(function () {
								e.water.seek(0), e.water.play()
							}, 3e3)
						}), this.scale_intro.onEnded(function () {
							e.scale_loop.play()
						})
					}
					return n(t, [{
						key: "resetAudio",
						value: function () {
							var t = this;
							this.musicPool.forEach(function (e) {
								t[e].stop()
							})
						}
					}, {
						key: "register",
						value: function (t, e, i) {
							this[t].before = e, this[t].after = i
						}
					}, {
						key: "clearTimer",
						value: function () {
							this.timer && (clearTimeout(this.timer), this.timer = null)
						}
					}, {
						key: "replay",
						value: function (t) {
							var e = this[t];
							e ? (e.stop(), e.play()) : console.warn("there is no music", t)
						}
					}]), t
				}();
			e.default = a
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = (function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					e.default = t
				}(i(0)), function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(45))),
				a = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.num = 0, this.list = [], this.imgPlanes = [], this.camera = e, this.lookers = new r.default({
							camera: e
						}), this.isOpen = !1
					}
					return n(t, [{
						key: "peopleCome",
						value: function (t) {
							this.list.findIndex(function (e) {
								return !!e && e.audience_openid == t.audience_openid
							}) > -1 || (this.list.push(t), this.num++, this.isOpen && this.showAvatar())
						}
					}, {
						key: "peopleOut",
						value: function (t) {
							var e = this.list.findIndex(function (e) {
								return !!e && e.audience_openid == t.audience_openid
							});
							e < 0 || (this.num = this.num - 1 < 0 ? 0 : this.num - 1, this.list.splice(e, 1), this.isOpen && this.showAvatar())
						}
					}, {
						key: "showAvatar",
						value: function () {
							if (this.num > 0) {
								for (var t = [], e = 1; e < 4; e++) this.list.length - e >= 0 && t.unshift(this.list[this.list.length - e].audience_headimg);
								this.lookers.showLookers({
									avaImg: !0,
									icon: !0,
									wording: !1,
									num: this.num,
									avatar: t
								})
							} else this.lookers.showLookers({
								avaImg: !1,
								icon: !0,
								wording: !1
							})
						}
					}, {
						key: "open",
						value: function () {
							this.isOpen = !0, this.showAvatar()
						}
					}, {
						key: "close",
						value: function () {
							this.isOpen = !1, this.hideAll()
						}
					}, {
						key: "reset",
						value: function () {
							this.num = 0, this.list = [], this.lookers.hideLookers()
						}
					}, {
						key: "hideAll",
						value: function () {
							this.lookers.hideLookers()
						}
					}]), t
				}();
			e.default = a
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				a = i(1),
				o = new r.RingGeometry(a.WAVE.innerRadius, a.WAVE.outerRadius, a.WAVE.thetaSeg),
				s = new r.MeshBasicMaterial({
					color: a.COLORS.pureWhite,
					transparent: !0
				}),
				h = function () {
					function t() {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.obj = new r.Mesh(o, s), this.obj.rotation.x = -Math.PI / 2, this.obj.name = "wave"
					}
					return n(t, [{
						key: "reset",
						value: function () {
							this.obj.scale.set(1, 1, 1), this.obj.material.opacity = 1, this.obj.visible = !1
						}
					}]), t
				}();
			e.default = h
		}, function (t, e, i) {
			"use strict";
			var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
				return typeof t
			} : function (t) {
				return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
			};
			! function (t) {
				function e(n) {
					if (i[n]) return i[n].exports;
					var r = i[n] = {
						exports: {},
						id: n,
						loaded: !1
					};
					return t[n].call(r.exports, r, r.exports, e), r.loaded = !0, r.exports
				}
				var i = {};
				e.m = t, e.c = i, e.p = "", e(0)
			}([function (t, e, i) {
				var n = function (t) {
						if (t && t.__esModule) return t;
						var e = {};
						if (null != t)
							for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
						return e.default = t, e
					}(i(1)),
					r = GameGlobal;
				GameGlobal.__isAdapterInjected || (GameGlobal.__isAdapterInjected = !0, function () {
					n.addEventListener = n.canvas.addEventListener = function (t, e) {
						n.document.addEventListener(t, e)
					}, n.removeEventListener = n.canvas.removeEventListener = function (t, e) {
						n.document.removeEventListener(t, e)
					};
					var t = wx.getSystemInfoSync().platform;
					if ("undefined" == typeof __devtoolssubcontext && "devtools" === t) {
						for (var e in n) {
							var i = Object.getOwnPropertyDescriptor(r, e);
							i && !0 !== i.configurable || Object.defineProperty(window, e, {
								value: n[e]
							})
						}
						for (var a in n.document) {
							var o = Object.getOwnPropertyDescriptor(r.document, a);
							o && !0 !== o.configurable || Object.defineProperty(r.document, a, {
								value: n.document[a]
							})
						}
						window.parent = window
					} else {
						for (var s in n) r[s] = n[s];
						r.window = n, window = r, window.top = window.parent = window
					}
				}())
			}, function (t, e, i) {
				function n(t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}
				Object.defineProperty(e, "__esModule", {
					value: !0
				}), e.cancelAnimationFrame = e.requestAnimationFrame = e.clearInterval = e.clearTimeout = e.setInterval = e.setTimeout = e.canvas = e.location = e.localStorage = e.HTMLElement = e.FileReader = e.Audio = e.Image = e.WebSocket = e.XMLHttpRequest = e.navigator = e.document = void 0;
				var r = i(2);
				Object.keys(r).forEach(function (t) {
					"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
						enumerable: !0,
						get: function () {
							return r[t]
						}
					})
				});
				var a = i(3);
				Object.keys(a).forEach(function (t) {
					"default" !== t && "__esModule" !== t && Object.defineProperty(e, t, {
						enumerable: !0,
						get: function () {
							return a[t]
						}
					})
				});
				var o = n(i(9)),
					s = n(i(10)),
					h = n(i(17)),
					l = n(i(18)),
					c = n(i(19)),
					u = n(i(11)),
					d = n(i(12)),
					f = n(i(20)),
					p = n(i(4)),
					m = n(i(21)),
					g = n(i(22));
				e.document = s.default, e.navigator = h.default, e.XMLHttpRequest = l.default, e.WebSocket = c.default, e.Image = u.default, e.Audio = d.default, e.FileReader = f.default, e.HTMLElement = p.default, e.localStorage = m.default, e.location = g.default;
				var v = new o.default;
				e.canvas = v, e.setTimeout = setTimeout, e.setInterval = setInterval, e.clearTimeout = clearTimeout, e.clearInterval = clearInterval, e.requestAnimationFrame = requestAnimationFrame, e.cancelAnimationFrame = cancelAnimationFrame
			}, function (t, e) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var i = wx.getSystemInfoSync(),
					n = i.screenWidth,
					r = i.screenHeight,
					a = i.devicePixelRatio,
					o = e.innerWidth = n,
					s = e.innerHeight = r;
				e.devicePixelRatio = a;
				e.screen = {
					availWidth: o,
					availHeight: s
				}, e.performance = {
					now: function () {
						return Date.now() / 1e3
					}
				}, e.ontouchstart = null, e.ontouchmove = null, e.ontouchend = null
			}, function (t, e, i) {
				function r(t, e) {
					if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
				}

				function a(t, e) {
					if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
					return !e || "object" !== (void 0 === e ? "undefined" : n(e)) && "function" != typeof e ? t : e
				}

				function o(t, e) {
					if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === e ? "undefined" : n(e)));
					t.prototype = Object.create(e && e.prototype, {
						constructor: {
							value: t,
							enumerable: !1,
							writable: !0,
							configurable: !0
						}
					}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
				}
				Object.defineProperty(e, "__esModule", {
					value: !0
				}), e.HTMLCanvasElement = e.HTMLImageElement = void 0;
				var s = function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(4));
				e.HTMLImageElement = function (t) {
					function e() {
						return r(this, e), a(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, "img"))
					}
					return o(e, s.default), e
				}(), e.HTMLCanvasElement = function (t) {
					function e() {
						return r(this, e), a(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, "canvas"))
					}
					return o(e, s.default), e
				}()
			}, function (t, e, i) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var r = function () {
						function t(t, e) {
							for (var i = 0; i < e.length; i++) {
								var n = e[i];
								n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
							}
						}
						return function (e, i, n) {
							return i && t(e.prototype, i), n && t(e, n), e
						}
					}(),
					a = function (t) {
						return t && t.__esModule ? t : {
							default: t
						}
					}(i(5)),
					o = i(8),
					s = i(2),
					h = function (t) {
						function e() {
							var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
							! function (t, e) {
								if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
							}(this, e);
							var i = function (t, e) {
								if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
								return !e || "object" !== (void 0 === e ? "undefined" : n(e)) && "function" != typeof e ? t : e
							}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
							return i.className = "", i.childern = [], i.style = {
								width: s.innerWidth + "px",
								height: s.innerHeight + "px"
							}, i.insertBefore = o.noop, i.innerHTML = "", i.tagName = t.toUpperCase(), i
						}
						return function (t, e) {
							if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === e ? "undefined" : n(e)));
							t.prototype = Object.create(e && e.prototype, {
								constructor: {
									value: t,
									enumerable: !1,
									writable: !0,
									configurable: !0
								}
							}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
						}(e, a.default), r(e, [{
							key: "setAttribute",
							value: function (t, e) {
								this[t] = e
							}
						}, {
							key: "getAttribute",
							value: function (t) {
								return this[t]
							}
						}, {
							key: "getBoundingClientRect",
							value: function () {
								return {
									top: 0,
									left: 0,
									width: s.innerWidth,
									height: s.innerHeight
								}
							}
						}, {
							key: "focus",
							value: function () {}
						}, {
							key: "clientWidth",
							get: function () {
								var t = parseInt(this.style.fontSize, 10) * this.innerHTML.length;
								return Number.isNaN(t) ? 0 : t
							}
						}, {
							key: "clientHeight",
							get: function () {
								var t = parseInt(this.style.fontSize, 10);
								return Number.isNaN(t) ? 0 : t
							}
						}]), e
					}();
				e.default = h
			}, function (t, e, i) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var r = function (t) {
						return t && t.__esModule ? t : {
							default: t
						}
					}(i(6)),
					a = function (t) {
						function e() {
							! function (t, e) {
								if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
							}(this, e);
							var t = function (t, e) {
								if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
								return !e || "object" !== (void 0 === e ? "undefined" : n(e)) && "function" != typeof e ? t : e
							}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
							return t.className = "", t.children = [], t
						}
						return function (t, e) {
							if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === e ? "undefined" : n(e)));
							t.prototype = Object.create(e && e.prototype, {
								constructor: {
									value: t,
									enumerable: !1,
									writable: !0,
									configurable: !0
								}
							}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
						}(e, r.default), e
					}();
				e.default = a
			}, function (t, e, i) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var r = function () {
						function t(t, e) {
							for (var i = 0; i < e.length; i++) {
								var n = e[i];
								n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
							}
						}
						return function (e, i, n) {
							return i && t(e.prototype, i), n && t(e, n), e
						}
					}(),
					a = function (t) {
						return t && t.__esModule ? t : {
							default: t
						}
					}(i(7)),
					o = function (t) {
						function e() {
							! function (t, e) {
								if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
							}(this, e);
							var t = function (t, e) {
								if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
								return !e || "object" !== (void 0 === e ? "undefined" : n(e)) && "function" != typeof e ? t : e
							}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
							return t.childNodes = [], t
						}
						return function (t, e) {
							if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === e ? "undefined" : n(e)));
							t.prototype = Object.create(e && e.prototype, {
								constructor: {
									value: t,
									enumerable: !1,
									writable: !0,
									configurable: !0
								}
							}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
						}(e, a.default), r(e, [{
							key: "appendChild",
							value: function (t) {
								if (!(t instanceof e)) throw new TypeError("Failed to executed 'appendChild' on 'Node': parameter 1 is not of type 'Node'.");
								this.childNodes.push(t)
							}
						}, {
							key: "cloneNode",
							value: function () {
								var t = Object.create(this);
								return Object.assign(t, this), t
							}
						}, {
							key: "removeChild",
							value: function (t) {
								var e = this.childNodes.findIndex(function (e) {
									return e === t
								});
								return e > -1 ? this.childNodes.splice(e, 1) : null
							}
						}]), e
					}();
				e.default = o
			}, function (t, e) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var i = function () {
						function t(t, e) {
							for (var i = 0; i < e.length; i++) {
								var n = e[i];
								n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
							}
						}
						return function (e, i, n) {
							return i && t(e.prototype, i), n && t(e, n), e
						}
					}(),
					n = new WeakMap,
					r = function () {
						function t() {
							! function (t, e) {
								if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
							}(this, t), n.set(this, {})
						}
						return i(t, [{
							key: "addEventListener",
							value: function (t, e) {
								var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
									r = n.get(this);
								r || (r = {}, n.set(this, r)), r[t] || (r[t] = []), r[t].push(e), i.capture && console.warn("EventTarget.addEventListener: options.capture is not implemented."), i.once && console.warn("EventTarget.addEventListener: options.once is not implemented."), i.passive && console.warn("EventTarget.addEventListener: options.passive is not implemented.")
							}
						}, {
							key: "removeEventListener",
							value: function (t, e) {
								var i = n.get(this)[t];
								if (i && i.length > 0)
									for (var r = i.length; r--; r > 0)
										if (i[r] === e) {
											i.splice(r, 1);
											break
										}
							}
						}, {
							key: "dispatchEvent",
							value: function () {
								var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
									e = n.get(this)[t.type];
								if (e)
									for (var i = 0; i < e.length; i++) e[i](t)
							}
						}]), t
					}();
				e.default = r
			}, function (t, e) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				}), e.noop = function () {}
			}, function (t, e, i) {
				function n(t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}
				Object.defineProperty(e, "__esModule", {
					value: !0
				}), e.default = function () {
					var t = wx.createCanvas();
					return t.type = "canvas", t.__proto__.__proto__ = new r.default("canvas"), t.getContext, t.getBoundingClientRect = function () {
						return {
							top: 0,
							left: 0,
							width: window.innerWidth,
							height: window.innerHeight
						}
					}, t
				};
				i(3);
				var r = n(i(4));
				n(i(10))
			}, function (t, e, i) {
				function n(t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var r = function (t) {
						if (t && t.__esModule) return t;
						var e = {};
						if (null != t)
							for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
						return e.default = t, e
					}(i(1)),
					a = n(i(4)),
					o = n(i(11)),
					s = n(i(12)),
					h = n(i(9));
				i(15);
				var l = {},
					c = {
						readyState: "complete",
						visibilityState: "visible",
						documentElement: r,
						hidden: !1,
						style: {},
						location: r.location,
						ontouchstart: null,
						ontouchmove: null,
						ontouchend: null,
						head: new a.default("head"),
						body: new a.default("body"),
						createElement: function (t) {
							return "canvas" === t ? new h.default : "audio" === t ? new s.default : "img" === t ? new o.default : new a.default(t)
						},
						getElementById: function (t) {
							return t === r.canvas.id ? r.canvas : null
						},
						getElementsByTagName: function (t) {
							return "head" === t ? [c.head] : "body" === t ? [c.body] : "canvas" === t ? [r.canvas] : []
						},
						querySelector: function (t) {
							return "head" === t ? c.head : "body" === t ? c.body : "canvas" === t ? r.canvas : t === "#" + r.canvas.id ? r.canvas : null
						},
						querySelectorAll: function (t) {
							return "head" === t ? [c.head] : "body" === t ? [c.body] : "canvas" === t ? [r.canvas] : []
						},
						addEventListener: function (t, e) {
							l[t] || (l[t] = []), l[t].push(e)
						},
						removeEventListener: function (t, e) {
							var i = l[t];
							if (i && i.length > 0)
								for (var n = i.length; n--; n > 0)
									if (i[n] === e) {
										i.splice(n, 1);
										break
									}
						},
						dispatchEvent: function (t) {
							var e = l[t.type];
							if (e)
								for (var i = 0; i < e.length; i++) e[i](t)
						}
					};
				e.default = c
			}, function (t, e) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				}), e.default = function () {
					return wx.createImage()
				}
			}, function (t, e, i) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var r = function () {
						function t(t, e) {
							for (var i = 0; i < e.length; i++) {
								var n = e[i];
								n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
							}
						}
						return function (e, i, n) {
							return i && t(e.prototype, i), n && t(e, n), e
						}
					}(),
					a = function (t) {
						return t && t.__esModule ? t : {
							default: t
						}
					}(i(13)),
					o = 0,
					s = 1,
					h = 2,
					l = 3,
					c = 4,
					u = new WeakMap,
					d = new WeakMap,
					f = (new WeakMap, new WeakMap, function (t) {
						function e(t) {
							! function (t, e) {
								if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
							}(this, e);
							var i = function (t, e) {
								if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
								return !e || "object" !== (void 0 === e ? "undefined" : n(e)) && "function" != typeof e ? t : e
							}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this));
							i.HAVE_NOTHING = o, i.HAVE_METADATA = s, i.HAVE_CURRENT_DATA = h, i.HAVE_FUTURE_DATA = l, i.HAVE_ENOUGH_DATA = c, i.readyState = o, d.set(i, "");
							var r = wx.createInnerAudioContext();
							return u.set(i, r), r.onCanplay(function () {
								i.dispatchEvent({
									type: "load"
								}), i.dispatchEvent({
									type: "loadend"
								}), i.dispatchEvent({
									type: "canplay"
								}), i.dispatchEvent({
									type: "canplaythrough"
								}), i.dispatchEvent({
									type: "loadedmetadata"
								}), i.readyState = h
							}), r.onPlay(function () {
								i.dispatchEvent({
									type: "play"
								})
							}), r.onPause(function () {
								i.dispatchEvent({
									type: "pause"
								})
							}), r.onEnded(function () {
								i.dispatchEvent({
									type: "ended"
								}), i.readyState = c
							}), r.onError(function () {
								i.dispatchEvent({
									type: "error"
								})
							}), t && (u.get(i).src = t), i
						}
						return function (t, e) {
							if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === e ? "undefined" : n(e)));
							t.prototype = Object.create(e && e.prototype, {
								constructor: {
									value: t,
									enumerable: !1,
									writable: !0,
									configurable: !0
								}
							}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
						}(e, a.default), r(e, [{
							key: "load",
							value: function () {
								console.warn("HTMLAudioElement.load() is not implemented.")
							}
						}, {
							key: "play",
							value: function () {
								u.get(this).play()
							}
						}, {
							key: "pause",
							value: function () {
								u.get(this).pause()
							}
						}, {
							key: "canPlayType",
							value: function () {
								var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
								return "string" != typeof t ? "" : t.indexOf("audio/mpeg") > -1 || t.indexOf("audio/mp4") ? "probably" : ""
							}
						}, {
							key: "cloneNode",
							value: function () {
								var t = new e;
								return t.loop = u.get(this).loop, t.autoplay = u.get(this).loop, t.src = this.src, t
							}
						}, {
							key: "currentTime",
							get: function () {
								return u.get(this).currentTime
							},
							set: function (t) {
								u.get(this).seek(t)
							}
						}, {
							key: "src",
							get: function () {
								return d.get(this)
							},
							set: function (t) {
								d.set(this, t), u.get(this).src = t
							}
						}, {
							key: "loop",
							get: function () {
								return u.get(this).loop
							},
							set: function (t) {
								u.get(this).loop = t
							}
						}, {
							key: "autoplay",
							get: function () {
								return u.get(this).autoplay
							},
							set: function (t) {
								u.get(this).autoplay = t
							}
						}, {
							key: "paused",
							get: function () {
								return u.get(this).paused
							}
						}]), e
					}());
				e.default = f
			}, function (t, e, i) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var r = function (t) {
						return t && t.__esModule ? t : {
							default: t
						}
					}(i(14)),
					a = function (t) {
						function e() {
							return function (t, e) {
									if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
								}(this, e),
								function (t, e) {
									if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
									return !e || "object" !== (void 0 === e ? "undefined" : n(e)) && "function" != typeof e ? t : e
								}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, "audio"))
						}
						return function (t, e) {
							if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === e ? "undefined" : n(e)));
							t.prototype = Object.create(e && e.prototype, {
								constructor: {
									value: t,
									enumerable: !1,
									writable: !0,
									configurable: !0
								}
							}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
						}(e, r.default), e
					}();
				e.default = a
			}, function (t, e, i) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var r = function () {
						function t(t, e) {
							for (var i = 0; i < e.length; i++) {
								var n = e[i];
								n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
							}
						}
						return function (e, i, n) {
							return i && t(e.prototype, i), n && t(e, n), e
						}
					}(),
					a = function (t) {
						return t && t.__esModule ? t : {
							default: t
						}
					}(i(4)),
					o = function (t) {
						function e(t) {
							return function (t, e) {
									if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
								}(this, e),
								function (t, e) {
									if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
									return !e || "object" !== (void 0 === e ? "undefined" : n(e)) && "function" != typeof e ? t : e
								}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t))
						}
						return function (t, e) {
							if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + (void 0 === e ? "undefined" : n(e)));
							t.prototype = Object.create(e && e.prototype, {
								constructor: {
									value: t,
									enumerable: !1,
									writable: !0,
									configurable: !0
								}
							}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
						}(e, a.default), r(e, [{
							key: "addTextTrack",
							value: function () {}
						}, {
							key: "captureStream",
							value: function () {}
						}, {
							key: "fastSeek",
							value: function () {}
						}, {
							key: "load",
							value: function () {}
						}, {
							key: "pause",
							value: function () {}
						}, {
							key: "play",
							value: function () {}
						}]), e
					}();
				e.default = o
			}, function (t, e, i) {
				i(16)
			}, function (t, e, i) {
				function n(t) {
					return function (e) {
						var i = new s(t);
						i.touches = e.touches, i.targetTouches = Array.prototype.slice.call(e.touches), i.changedTouches = e.changedTouches, i.timeStamp = e.timeStamp, a.default.dispatchEvent(i)
					}
				}
				var r = function (t) {
						if (t && t.__esModule) return t;
						var e = {};
						if (null != t)
							for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
						return e.default = t, e
					}(i(1)),
					a = function (t) {
						return t && t.__esModule ? t : {
							default: t
						}
					}(i(10)),
					o = i(8),
					s = function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.target = r.canvas, this.currentTarget = r.canvas, this.touches = [], this.targetTouches = [], this.changedTouches = [], this.preventDefault = o.noop, this.stopPropagation = o.noop, this.type = e
					};
				wx.onTouchStart(n("touchstart")), wx.onTouchMove(n("touchmove")), wx.onTouchEnd(n("touchend")), wx.onTouchCancel(n("touchcancel"))
			}, function (t, e, i) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var n = i(8),
					r = {
						platform: wx.getSystemInfoSync().platform,
						language: "zh-cn",
						appVersion: "5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1",
						userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/zh_CN",
						onLine: !0,
						geolocation: {
							getCurrentPosition: n.noop,
							watchPosition: n.noop,
							clearWatch: n.noop
						}
					};
				e.default = r
			}, function (t, e) {
				function i(t) {
					if ("function" == typeof this["on" + t]) {
						for (var e = arguments.length, i = Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++) i[n - 1] = arguments[n];
						this["on" + t].apply(this, i)
					}
				}

				function n(t) {
					this.readyState = t, i.call(this, "readystatechange")
				}
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var r = function () {
						function t(t, e) {
							for (var i = 0; i < e.length; i++) {
								var n = e[i];
								n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
							}
						}
						return function (e, i, n) {
							return i && t(e.prototype, i), n && t(e, n), e
						}
					}(),
					a = new WeakMap,
					o = new WeakMap,
					s = new WeakMap,
					h = new WeakMap,
					l = new WeakMap,
					c = function () {
						function t() {
							! function (t, e) {
								if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
							}(this, t), this.onabort = null, this.onerror = null, this.onload = null, this.onloadstart = null, this.onprogress = null, this.ontimeout = null, this.onloadend = null, this.onreadystatechange = null, this.readyState = 0, this.response = null, this.responseText = null, this.responseType = "", this.responseXML = null, this.status = 0, this.statusText = "", this.upload = {}, this.withCredentials = !1, s.set(this, {
								"content-type": "application/x-www-form-urlencoded"
							}), h.set(this, {})
						}
						return r(t, [{
							key: "abort",
							value: function () {
								var t = l.get(this);
								t && t.abort()
							}
						}, {
							key: "getAllResponseHeaders",
							value: function () {
								var t = h.get(this);
								return Object.keys(t).map(function (e) {
									return e + ": " + t[e]
								}).join("\n")
							}
						}, {
							key: "getResponseHeader",
							value: function (t) {
								return h.get(this)[t]
							}
						}, {
							key: "open",
							value: function (e, i) {
								o.set(this, e), a.set(this, i), n.call(this, t.OPENED)
							}
						}, {
							key: "overrideMimeType",
							value: function () {}
						}, {
							key: "send",
							value: function () {
								var e = this,
									r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "";
								if (this.readyState !== t.OPENED) throw new Error("Failed to execute 'send' on 'XMLHttpRequest': The object's state must be OPENED.");
								wx.request({
									data: r,
									url: a.get(this),
									method: o.get(this),
									header: s.get(this),
									responseType: this.responseType,
									success: function (r) {
										var a = r.data,
											o = r.statusCode,
											s = r.header;
										if ("string" != typeof a && !(a instanceof ArrayBuffer)) try {
											a = JSON.stringify(a)
										} catch (t) {
											a = a
										}
										if (e.status = o, h.set(e, s), i.call(e, "loadstart"), n.call(e, t.HEADERS_RECEIVED), n.call(e, t.LOADING), e.response = a, a instanceof ArrayBuffer) {
											e.responseText = "";
											for (var l = new Uint8Array(a), c = l.byteLength, u = 0; u < c; u++) e.responseText += String.fromCharCode(l[u])
										} else e.responseText = a;
										n.call(e, t.DONE), i.call(e, "load"), i.call(e, "loadend")
									},
									fail: function (t) {
										var n = t.errMsg; - 1 !== n.indexOf("abort") ? i.call(e, "abort") : i.call(e, "error", n), i.call(e, "loadend")
									}
								})
							}
						}, {
							key: "setRequestHeader",
							value: function (t, e) {
								var i = s.get(this);
								i[t] = e, s.set(this, i)
							}
						}]), t
					}();
				c.UNSEND = 0, c.OPENED = 1, c.HEADERS_RECEIVED = 2, c.LOADING = 3, c.DONE = 4, e.default = c
			}, function (t, e) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var i = function () {
						function t(t, e) {
							for (var i = 0; i < e.length; i++) {
								var n = e[i];
								n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
							}
						}
						return function (e, i, n) {
							return i && t(e.prototype, i), n && t(e, n), e
						}
					}(),
					n = new WeakMap,
					r = function () {
						function t(e) {
							var i = this,
								r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [];
							if (function (t, e) {
									if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
								}(this, t), this.binaryType = "", this.bufferedAmount = 0, this.extensions = "", this.onclose = null, this.onerror = null, this.onmessage = null, this.onopen = null, this.protocol = "", this.readyState = 3, "string" != typeof e || !/(^ws:\/\/)|(^wss:\/\/)/.test(e)) throw new TypeError("Failed to construct 'WebSocket': The URL '" + e + "' is invalid");
							this.url = e, this.readyState = t.CONNECTING;
							var a = wx.connectSocket({
								url: e,
								protocols: Array.isArray(r) ? r : [r]
							});
							return n.set(this, a), a.onClose(function (e) {
								i.readyState = t.CLOSED, "function" == typeof i.onclose && i.onclose(e)
							}), a.onMessage(function (t) {
								"function" == typeof i.onmessage && i.onmessage(t)
							}), a.onOpen(function () {
								i.readyState = t.OPEN, "function" == typeof i.onopen && i.onopen()
							}), a.onError(function (t) {
								"function" == typeof i.onerror && i.onerror(new Error(t.errMsg))
							}), this
						}
						return i(t, [{
							key: "close",
							value: function (e, i) {
								this.readyState = t.CLOSING;
								n.get(this).close({
									code: e,
									reason: i
								})
							}
						}, {
							key: "send",
							value: function (t) {
								if ("string" != typeof t && !(t instanceof ArrayBuffer)) throw new TypeError("Failed to send message: The data " + t + " is invalid");
								n.get(this).send({
									data: t
								})
							}
						}]), t
					}();
				r.CONNECTING = 0, r.OPEN = 1, r.CLOSING = 2, r.CLOSED = 3, e.default = r
			}, function (t, e) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				e.default = function t() {
					! function (e, i) {
						if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
					}(this)
				}
			}, function (t, e) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				var i = {
					get length() {
						return wx.getStorageInfoSync().keys.length
					},
					key: function (t) {
						return wx.getStorageInfoSync().keys[t]
					},
					getItem: function (t) {
						return wx.getStorageSync(t)
					},
					setItem: function (t, e) {
						return wx.setStorageSync(t, e)
					},
					removeItem: function (t) {
						wx.removeStorageSync(t)
					},
					clear: function () {
						wx.clearStorageSync()
					}
				};
				e.default = i
			}, function (t, e) {
				Object.defineProperty(e, "__esModule", {
					value: !0
				});
				e.default = {
					href: "game.js",
					reload: function () {}
				}
			}])
		}, function (t, e) {
			t.exports = function (t, e) {
				for (var i = t[0], n = t[1], r = !1, a = 0, o = e.length - 1; a < e.length; o = a++) {
					var s = e[a][0],
						h = e[a][1],
						l = e[o][0],
						c = e[o][1];
					h > n != c > n && i < (l - s) * (n - h) / (c - h) + s && (r = !r)
				}
				return r
			}
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(43)),
				o = n(i(42)),
				s = n(i(2)),
				h = function () {
					function t(e, i) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.name = "battlePage", this.game = e, this.gameCtrl = this.game.gameCtrl, this.model = this.game.gameModel, this.view = this.game.gameView, this.modeCtrl = i, this.netWorkCtrl = this.gameCtrl.netWorkCtrl, this.currentPage = null, this.pkPage = new a.default(e), this.gamePage = new o.default(e), this.shareTicket = "", this.pkId = "", this.shareInfoTimeout = null, this.battleScore = void 0
					}
					return r(t, [{
						key: "init",
						value: function (t) {
							var e = this.model.getSessionId();
							this.shareTicket = t.shareTicket, this.pkId = t.query.pkId, wx.showLoading(), e ? this.afterLogin(!0) : this.netWorkCtrl.netWorkLogin(this.afterLogin.bind(this))
						}
					}, {
						key: "afterLogin",
						value: function (t) {
							var e = this;
							t ? (this.setShareInfoTimeout(), wx.getShareInfo({
								shareTicket: this.shareTicket,
								success: function (t) {
									null != e.shareInfoTimeout && (e.clearShareInfoTimeout(), e.model.setShareTicket(t.rawData), e.gotoBattlePage(), e.gameCtrl.loginBattle(1))
								},
								fail: function (t) {
									null != e.shareInfoTimeout && (e.clearShareInfoTimeout(), e.gotoBattlePage(), e.gameCtrl.loginBattle(0))
								}
							})) : this.goToBattleFail()
						}
					}, {
						key: "gotoBattlePage",
						value: function () {
							s.default.getBattleData(this.gotoBattlePageAfterHaveData.bind(this), this.pkId)
						}
					}, {
						key: "gotoBattlePageAfterHaveData",
						value: function (t, e) {
							if (wx.hideLoading(), t) {
								var i = [];
								e.data.challenger.length && e.data.challenger.forEach(function (t) {
									i.push({
										headimg: t.headimg,
										is_self: t.is_self ? 1 : 0,
										nickname: t.nickname,
										score_info: [{
											score: t.score
										}]
									})
								}, this), i.sort(function (t, e) {
									return e.score_info[0].score - t.score_info[0].score
								});
								var n = {
									data: {
										organizerInfo: {
											headimg: e.data.owner.headimg,
											nickname: e.data.owner.nickname,
											score_info: [{
												score: e.data.owner.score
											}],
											left_time: e.data.left_time,
											is_self: e.data.is_owner ? 1 : 0
										},
										pkListInfo: i,
										gg_score: this.battleScore
									}
								};
								this.currentPage && this.currentPage.hide(), this.pkPage.show(n), this.model.setStage(this.pkPage.name), this.currentPage = this.pkPage, this.gameCtrl.showPkPage(e.data.owner.score)
							} else this.goToBattleFail()
						}
					}, {
						key: "goToBattleFail",
						value: function () {
							this.view.showGoToBattleFail(), this.modeCtrl.changeMode("singleCtrl")
						}
					}, {
						key: "setShareInfoTimeout",
						value: function () {
							this.shareInfoTimeout = setTimeout(this.handleShareInfoTimeout.bind(this), 5e3)
						}
					}, {
						key: "clearShareInfoTimeout",
						value: function () {
							null != this.shareInfoTimeout && (clearTimeout(this.shareInfoTimeout), this.shareInfoTimeout = null)
						}
					}, {
						key: "handleShareInfoTimeout",
						value: function () {
							this.clearShareInfoTimeout(), this.goToBattleFail()
						}
					}, {
						key: "destroy",
						value: function () {
							this.currentPage && this.currentPage.hide(), wx.hideLoading(), this.shareTicket = "", this.pkId = "", this.clearShareInfoTimeout(), this.model.clearShareTicket(), this.game.resetScene(), this.battleScore = void 0
						}
					}, {
						key: "battlePlay",
						value: function (t) {
							t ? (this.currentPage && this.currentPage.hide(), this.gamePage.show(), this.game.replayGame(), this.model.setStage(this.gamePage.name), this.currentPage = this.gamePage) : (this.modeCtrl.directPlaySingleGame(), this.gameCtrl.battleToSingle())
						}
					}, {
						key: "showGameOverPage",
						value: function () {
							this.currentPage && this.currentPage.hide(), this.model.setStage(""), this.currentPage = null;
							var t = this.model.currentScore;
							this.battleScore = t, wx.showLoading(), s.default.updatepkinfo(this.gotoBattlePageAgain.bind(this), this.pkId, t)
						}
					}, {
						key: "gotoBattlePageAgain",
						value: function (t) {
							t || this.view.showUploadPkScoreFail(), this.gotoBattlePage()
						}
					}, {
						key: "wxOnhide",
						value: function () {}
					}]), t
				}();
			e.default = h
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(44)),
				o = n(i(2)),
				s = function () {
					function t(e, i) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.name = "groupShare", this.game = e, this.gameCtrl = this.game.gameCtrl, this.model = this.game.gameModel, this.view = this.game.gameView, this.netWorkCtrl = this.gameCtrl.netWorkCtrl, this.modeCtrl = i, this.groupPage = new a.default(e), this.shareTicket = "", this.shareInfoTimeout = null
					}
					return r(t, [{
						key: "init",
						value: function (t) {
							var e = this.model.getServerConfig();
							if (e && !e.group_score_switch) return this.view.showServeConfigForbiddenGroupShare(), void this.modeCtrl.changeMode("singleCtrl");
							var i = this.model.getSessionId();
							this.shareTicket = t.shareTicket, wx.showLoading(), i ? this.afterLogin(!0) : this.netWorkCtrl.netWorkLogin(this.afterLogin.bind(this))
						}
					}, {
						key: "afterLogin",
						value: function (t) {
							var e = this;
							t ? (this.setShareInfoTimeout(), wx.getShareInfo({
								shareTicket: this.shareTicket,
								success: function (t) {
									null != e.shareInfoTimeout && (e.clearShareInfoTimeout(), e.model.setShareTicket(t.rawData), o.default.getGroupScore(function (t, i) {
										if (t) {
											var n = i.data.user_info || [],
												r = i.data.my_user_info || {};
											e.showGroupRankPage(n, r)
										} else e.goToGroupShareFail();
										wx.hideLoading()
									}))
								},
								fail: function (t) {
									null != e.shareInfoTimeout && (e.clearShareInfoTimeout(), wx.hideLoading(), e.goToGroupShareFail("群里的群分享才有效哦~"))
								}
							})) : (wx.hideLoading(), this.goToGroupShareFail())
						}
					}, {
						key: "setShareInfoTimeout",
						value: function () {
							this.shareInfoTimeout = setTimeout(this.handleShareInfoTimeout.bind(this), 5e3)
						}
					}, {
						key: "clearShareInfoTimeout",
						value: function () {
							null != this.shareInfoTimeout && (clearTimeout(this.shareInfoTimeout), this.shareInfoTimeout = null)
						}
					}, {
						key: "handleShareInfoTimeout",
						value: function () {
							this.clearShareInfoTimeout(), this.goToGroupShareFail()
						}
					}, {
						key: "goToGroupShareFail",
						value: function (t) {
							this.view.showGroupShareFail(t), this.modeCtrl.changeMode("singleCtrl")
						}
					}, {
						key: "showGroupRankPage",
						value: function (t, e) {
							this.groupPage.show(t, e), this.model.setStage(this.groupPage.name), this.currentPage = this.groupPage
						}
					}, {
						key: "destroy",
						value: function () {
							wx.hideLoading(), this.currentPage && this.currentPage.hide(), this.shareTicket = "", this.model.clearShareTicket(), this.clearShareInfoTimeout(), this.game.resetScene()
						}
					}, {
						key: "groupPlayGame",
						value: function () {
							this.modeCtrl.directPlaySingleGame()
						}
					}, {
						key: "wxOnhide",
						value: function () {}
					}]), t
				}();
			e.default = s
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(9)),
				o = n(i(32)),
				s = n(i(31)),
				h = n(i(35)),
				l = n(i(36)),
				c = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.singleCtrl = new a.default(e, this), this.groupShareCtrl = new o.default(e, this), this.battleCtrl = new s.default(e, this), this.observeCtrl = new h.default(e, this), this.playerCtrl = new l.default(e, this), this.model = e.gameModel, this.gameCtrl = e.gameCtrl, this.currentCtrl = null
					}
					return r(t, [{
						key: "initFirstPage",
						value: function (t) {
							switch (this.model.getMode()) {
								case "single":
									this.currentCtrl = this.singleCtrl, this.singleCtrl.init(t), this.gameCtrl.netWorkLogin();
									break;
								case "groupShare":
									this.currentCtrl = this.groupShareCtrl, this.groupShareCtrl.init(t);
									break;
								case "battle":
									this.currentCtrl = this.battleCtrl, this.battleCtrl.init(t);
									break;
								case "observe":
									this.currentCtrl = this.observeCtrl, this.observeCtrl.init(t);
									break;
								default:
									this.currentCtrl = this.singleCtrl, this.model.setMode("single"), this.singleCtrl.init(t), this.gameCtrl.netWorkLogin()
							}
						}
					}, {
						key: "reInitFirstPage",
						value: function (t) {
							this.currentCtrl && (this.currentCtrl.destroy(), this.currentCtrl = null), this.gameCtrl.queryCtrl.identifyMode(t), this.initFirstPage(t)
						}
					}, {
						key: "clickStart",
						value: function () {
							this.currentCtrl && this.currentCtrl.clickStart()
						}
					}, {
						key: "showGameOverPage",
						value: function () {
							this.currentCtrl && this.currentCtrl.showGameOverPage()
						}
					}, {
						key: "gameOverClickReplay",
						value: function () {
							this.currentCtrl && this.currentCtrl.gameOverClickReplay()
						}
					}, {
						key: "showFriendRank",
						value: function () {
							this.currentCtrl && this.currentCtrl.showFriendRank()
						}
					}, {
						key: "friendRankReturn",
						value: function () {
							this.currentCtrl && this.currentCtrl.friendRankReturn()
						}
					}, {
						key: "shareGroupRank",
						value: function () {
							this.currentCtrl && this.currentCtrl.shareGroupRank()
						}
					}, {
						key: "clickRank",
						value: function () {
							this.currentCtrl && this.currentCtrl.clickRank()
						}
					}, {
						key: "shareBattleCard",
						value: function () {
							this.currentCtrl && this.currentCtrl.shareBattleCard()
						}
					}, {
						key: "changeMode",
						value: function (t) {
							this.currentCtrl && this.currentCtrl.destroy(), this.model.setMode(this[t].name), this.currentCtrl = this[t], this[t].init()
						}
					}, {
						key: "singleChangeToPlayer",
						value: function () {
							this.model.setMode(this.playerCtrl.name), this.currentCtrl = this.playerCtrl, this.playerCtrl.init()
						}
					}, {
						key: "groupPlayGame",
						value: function () {
							this.currentCtrl && this.currentCtrl.groupPlayGame()
						}
					}, {
						key: "directPlaySingleGame",
						value: function () {
							this.currentCtrl && this.currentCtrl.destroy(), this.model.setMode(this.singleCtrl.name), this.currentCtrl = this.singleCtrl, this.singleCtrl.clickStart()
						}
					}, {
						key: "battlePlay",
						value: function (t) {
							this.currentCtrl && this.currentCtrl.battlePlay(t)
						}
					}, {
						key: "shareObservCard",
						value: function () {
							this.currentCtrl && this.currentCtrl.shareObservCard()
						}
					}, {
						key: "socketJoinSuccess",
						value: function (t) {
							this.currentCtrl && this.currentCtrl.socketJoinSuccess(t)
						}
					}, {
						key: "showPlayerGG",
						value: function (t) {
							this.currentCtrl && this.currentCtrl.showPlayerGG(t)
						}
					}, {
						key: "showPlayerWaiting",
						value: function () {
							this.currentCtrl && this.currentCtrl.showPlayerWaiting()
						}
					}, {
						key: "onPlayerOut",
						value: function () {
							this.currentCtrl && this.currentCtrl.onPlayerOut()
						}
					}, {
						key: "onViewerStart",
						value: function () {
							this.currentCtrl && this.currentCtrl.onViewerStart()
						}
					}, {
						key: "wxOnhide",
						value: function () {
							this.currentCtrl && this.currentCtrl.wxOnhide()
						}
					}]), t
				}();
			e.default = c
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(2)),
				a = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.gameCtrl = e.gameCtrl, this.model = e.gameModel, this.loginCb = null, this.serverConfigInterval = null, this.historyTimes = this.game.historyTimes
					}
					return n(t, [{
						key: "netWorkLogin",
						value: function (t) {
							t && (this.loginCb = t), r.default.requestLogin(this.afterRequestLogin.bind(this))
						}
					}, {
						key: "afterRequestLogin",
						value: function (t) {
							this.loginCb && this.loginCb(t), t && (r.default.getUserInfo(), r.default.requestFriendsScore(this.updateFriendsScore.bind(this)), this.requestServerInit(), this.gameCtrl.onLoginSuccess())
						}
					}, {
						key: "requestServerInit",
						value: function () {
							r.default.requestInit(), this.serverConfigInterval = setInterval(r.default.requestInit.bind(r.default), 6e4)
						}
					}, {
						key: "clearServerInit",
						value: function () {
							this.serverConfigInterval && clearInterval(this.serverConfigInterval)
						}
					}, {
						key: "upDateFriendsScoreList",
						value: function () {
							this.model.getSessionId() && r.default.requestFriendsScore(this.updateFriendsScore2.bind(this))
						}
					}, {
						key: "updateFriendsScore",
						value: function (t, e) {
							if (t && (e.user_info.sort(function (t, e) {
									return -(t.week_best_score || 0) + (e.week_best_score || 0)
								}), this.model.saveFriendsScore(e.user_info), e.my_user_info)) {
								var i = e.my_user_info.history_best_score || 0;
								if (i > this.model.highestScore) this.model.saveHeighestScore(i);
								else if (i < this.model.highestScore) {
									var n = this.model.getActionData(),
										r = Date.now();
									if (n && n.ts > r) {
										var a = n.data;
										this.game.historyTimes.upLoadHistoryTimes(this.model.highestScore, a)
									}
								}
								var o = e.my_user_info.week_best_score || 0;
								this.model.weekBestScore = o, this.model.saveWeekBestScore(o);
								var s = e.my_user_info.times;
								this.historyTimes.verifyScore(s)
							}
						}
					}, {
						key: "updateFriendsScore2",
						value: function (t, e) {
							t && (e.user_info.sort(function (t, e) {
								return -(t.week_best_score || 0) + (e.week_best_score || 0)
							}), this.model.saveFriendsScore(e.user_info))
						}
					}, {
						key: "uploadScore",
						value: function (t) {
							r.default.requestSettlement(t)
						}
					}]), t
				}();
			e.default = a
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(48)),
				o = n(i(46)),
				s = n(i(47)),
				h = n(i(2)),
				l = function () {
					function t(e, i) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.name = "observe", this.gameCtrl = this.game.gameCtrl, this.model = this.game.gameModel, this.view = this.game.gameView, this.modeCtrl = i, this.netWorkCtrl = this.gameCtrl.netWorkCtrl, this.gameSocket = this.game.gameSocket, this.currentPage = null, this.waitingPage = new a.default(e), this.ggPage = new o.default(e), this.outPage = new s.default(e), this.gameId = "", this.longTimeout = null
					}
					return r(t, [{
						key: "init",
						value: function (t) {
							var e = this.model.getServerConfig();
							if (e && !e.audience_mode_switch) return this.view.showServeConfigForbiddenObserveMode(), void this.modeCtrl.changeMode("singleCtrl");
							var i = this.model.getSessionId();
							this.gameId = t.query.gameId, this.model.setObserveInfo({
								headimg: t.query.headimg,
								nickName: t.query.nickName
							}), this.model.setGameId(this.gameId), wx.showLoading(), i ? this.afterLogin(!0) : this.netWorkCtrl.netWorkLogin(this.afterLogin.bind(this))
						}
					}, {
						key: "afterLogin",
						value: function (t) {
							t ? (this.setLongTimeHandle(), this.gameSocket.connectSocket(), this.model.setStage("")) : this.goToObserveStateFail()
						}
					}, {
						key: "socketJoinSuccess",
						value: function (t) {
							this.clearLongTimeHandle(), wx.hideLoading(), t ? (this.waitingPage.show(), this.model.setStage(this.waitingPage.name), this.currentPage = this.waitingPage, this.game.UI.setScore(0), this.checkPlayerTimeout = setInterval(this.checkPlayerState.bind(this), 1e4)) : this.showPlayerDead()
						}
					}, {
						key: "goToObserveStateFail",
						value: function () {
							this.view.showObserveStateFail(), this.modeCtrl.changeMode("singleCtrl")
						}
					}, {
						key: "setLongTimeHandle",
						value: function () {
							this.longTimeout = setTimeout(this.handleLongTime.bind(this), 9e3)
						}
					}, {
						key: "handleLongTime",
						value: function () {
							this.goToObserveStateFail()
						}
					}, {
						key: "clearLongTimeHandle",
						value: function () {
							null != this.longTimeout && (clearTimeout(this.longTimeout), this.longTimeout = null)
						}
					}, {
						key: "showPlayerDead",
						value: function () {
							this.gameSocket.close(), this.clearCheckPlayerTimeout(), this.currentPage && this.currentPage.hide(), this.outPage.show(), this.model.setStage(this.outPage.name), this.currentPage = this.outPage
						}
					}, {
						key: "checkPlayerState",
						value: function () {
							h.default.syncop(this.judgePlayerState.bind(this))
						}
					}, {
						key: "judgePlayerState",
						value: function (t, e) {
							t ? 0 != e.data.state && (this.clearCheckPlayerTimeout(), this.showPlayerDead()) : this.handleSyncopErr()
						}
					}, {
						key: "handleSyncopErr",
						value: function () {
							this.view.showSyncopErr(), this.goToObserveStateFail()
						}
					}, {
						key: "clearCheckPlayerTimeout",
						value: function () {
							null != this.checkPlayerTimeout && (clearInterval(this.checkPlayerTimeout), this.checkPlayerTimeout = null)
						}
					}, {
						key: "destroy",
						value: function () {
							this.currentPage && this.currentPage.hide(), this.currentPage = null, this.model.clearGameId(), this.clearLongTimeHandle(), this.clearCheckPlayerTimeout(), wx.hideLoading(), this.gameSocket.alive && this.gameSocket.close(), this.model.clearObserveInfo(), this.game.instructionCtrl.destroy(), this.game.resetScene()
						}
					}, {
						key: "showPlayerWaiting",
						value: function () {
							this.currentPage != this.waitingPage && (null != this.currentPage && this.currentPage.hide(), this.waitingPage.show(), this.model.setStage(this.waitingPage.name), this.currentPage = this.waitingPage)
						}
					}, {
						key: "showPlayerGG",
						value: function (t) {
							null != this.currentPage && this.currentPage.hide(), this.ggPage.show(t), this.model.setStage(this.ggPage.name), this.currentPage = this.ggPage
						}
					}, {
						key: "onPlayerOut",
						value: function () {
							this.showPlayerDead()
						}
					}, {
						key: "onViewerStart",
						value: function () {
							this.gameSocket.quitObserve(), this.game.instructionCtrl.destroy(), this.modeCtrl.directPlaySingleGame()
						}
					}, {
						key: "showGameOverPage",
						value: function () {}
					}, {
						key: "wxOnhide",
						value: function () {
							this.clearCheckPlayerTimeout(), this.gameSocket.quitObserve(), this.gameSocket.close(), this.game.resetScene()
						}
					}, {
						key: "wxOnshow",
						value: function () {}
					}]), t
				}();
			e.default = l
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = function t(e, i, n) {
					null === e && (e = Function.prototype);
					var r = Object.getOwnPropertyDescriptor(e, i);
					if (void 0 === r) {
						var a = Object.getPrototypeOf(e);
						return null === a ? void 0 : t(a, i, n)
					}
					if ("value" in r) return r.value;
					var o = r.get;
					if (void 0 !== o) return o.call(n)
				},
				o = n(i(9)),
				s = i(6),
				h = n(i(49)),
				l = n(i(2)),
				c = function (t) {
					function e(t, i) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, e);
						var n = function (t, e) {
							if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
							return !e || "object" != typeof e && "function" != typeof e ? t : e
						}(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, i));
						return n.name = "player", n.currentPage = null, n.gamePage = new h.default(t), n
					}
					return function (t, e) {
						if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
						t.prototype = Object.create(e && e.prototype, {
							constructor: {
								value: t,
								enumerable: !1,
								writable: !0,
								configurable: !0
							}
						}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
					}(e, o.default), r(e, [{
						key: "init",
						value: function () {
							switch (this.model.stage) {
								case "game":
									this.currentPage = this.gamePage, this.currentPage.show();
									break;
								case "singleSettlementPgae":
									this.currentPage = this.gameOverPage;
									break;
								default:
									this.model.setStage(this.gamePage.name), this.currentPage = this.gamePage, this.currentPage.show()
							}
						}
					}, {
						key: "showGameOverPage",
						value: function () {
							this.game.seq++, this.gameSocket.sendCommand(this.game.seq, {
								type: -1,
								s: this.game.currentScore
							}), a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "showGameOverPage", this).call(this)
						}
					}, {
						key: "shareObservCard",
						value: function () {
							this.shareObservCardA()
						}
					}, {
						key: "shareObservCardA",
						value: function () {
							this.shareObservCardB()
						}
					}, {
						key: "shareObservCardB",
						value: function () {
							var t = this;
							this.model.setStage("loading"), (0, s.shareObserve)(function (e, i) {
								e && t.gameCtrl.afterShareObserveCard(i), setTimeout(function () {
									"loading" == t.model.stage && t.model.setStage("game")
								}, 50)
							})
						}
					}, {
						key: "gameOverClickReplay",
						value: function () {
							a(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "gameOverClickReplay", this).call(this), this.game.seq++, this.gameSocket.sendCommand(this.game.seq, {
								type: 0,
								seed: this.game.randomSeed
							})
						}
					}, {
						key: "destroy",
						value: function () {
							this.currentPage && this.currentPage.hide(), this.currentPage = null, this.gameSocket.alive && this.gameSocket.close(), this.model.clearGameId(), this.model.clearGameTicket(), this.game.viewer.reset(), this.game.resetScene()
						}
					}, {
						key: "wxOnhide",
						value: function () {
							var t = this;
							"loading" != this.model.stage && "singleSettlementPgae" != this.model.stage && "friendRankList" != this.model.stage && (l.default.quitGame(), this.gameSocket.cleanHeartBeat(), this.gameSocket.close(), setTimeout(function () {
								t.modeCtrl.changeMode("singleCtrl")
							}, 100))
						}
					}, {
						key: "wxOnshow",
						value: function () {}
					}]), e
				}();
			e.default = c
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.gameCtrl = this.game.gameCtrl
					}
					return n(t, [{
						key: "identifyMode",
						value: function (t) {
							if (t.query && t.query.hasOwnProperty("mode")) switch (t.query.mode) {
								case "groupShare":
									t.shareTicket ? this.model.setMode("groupShare") : (this.gameCtrl.identifyModeErr("获取群信息失败"), this.model.setMode("single"));
									break;
								case "battle":
									t.query.pkId ? this.model.setMode("battle") : (this.gameCtrl.identifyModeErr("获取PK信息失败"), this.model.setMode("single"));
									break;
								case "observe":
									t.query.gameId ? this.model.setMode("observe") : (this.gameCtrl.identifyModeErr("获取围观信息失败"), this.model.setMode("single"));
									break;
								default:
									this.model.setMode("single")
							} else this.model.setMode("single")
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n;
			(new(function (t) {
				if (t && t.__esModule) return t;
				var e = {};
				if (null != t)
					for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
				return e.default = t, e
			}(i(0)).FontLoader)).load(JSON.stringify({
				glyphs: {
					0: {
						ha: 868,
						x_min: 0,
						x_max: 696,
						o: "m 0 868 l 696 868 l 696 693 l 0 693 l 0 868 m 696 0 l 0 0 l 0 175 l 696 175 l 696 0 m 0 694 l 175 694 l 175 174 l 0 174 l 0 694 m 521 694 l 696 694 l 696 174 l 521 174 l 521 694 z "
					},
					1: {
						ha: 521,
						x_min: 0,
						x_max: 347,
						o: "m 174 0 l 347 0 l 347 868 l 0 868 l 0 694 l 174 694 l 174 0 z "
					},
					2: {
						ha: 868,
						x_min: 0,
						x_max: 694,
						o: "m 0 868 l 0 694 l 521 694 l 521 521 l 0 521 l 0 0 l 694 0 l 694 174 l 174 174 l 174 347 l 694 347 l 694 868 l 0 868 z "
					},
					3: {
						ha: 868,
						x_min: 0,
						x_max: 694,
						o: "m 694 0 l 694 868 l 0 868 l 0 694 l 521 694 l 521 521 l 0 521 l 0 347 l 521 347 l 521 174 l 0 174 l 0 0 l 694 0 z "
					},
					4: {
						ha: 868,
						x_min: 0,
						x_max: 694,
						o: "m 521 347 l 174 347 l 174 868 l 0 868 l 0 174 l 521 174 l 521 0 l 694 0 l 694 868 l 521 868 l 521 347 z "
					},
					5: {
						ha: 868,
						x_min: 0,
						x_max: 694,
						o: "m 694 694 l 694 868 l 0 868 l 0 347 l 521 347 l 521 174 l 0 174 l 0 0 l 694 0 l 694 521 l 174 521 l 174 694 l 694 694 z "
					},
					6: {
						ha: 868,
						x_min: 0,
						x_max: 694,
						o: "m 0 869 l 175 869 l 175 0 l 0 0 l 0 869 m 174 519 l 694 519 l 694 346 l 174 346 l 174 519 m 174 869 l 519 869 l 519 694 l 174 694 l 174 869 m 174 174 l 694 174 l 694 0 l 174 0 l 174 174 m 521 347 l 694 347 l 694 174 l 521 174 l 521 347 z "
					},
					7: {
						ha: 868,
						x_min: 0,
						x_max: 694,
						o: "m 0 868 l 0 694 l 521 694 l 521 521 l 694 521 l 694 868 l 0 868 m 347 347 l 521 347 l 521 521 l 347 521 l 347 347 m 174 0 l 347 0 l 347 347 l 174 347 l 174 0 z "
					},
					8: {
						ha: 868,
						x_min: 0,
						x_max: 694,
						o: "m 0 868 l 174 868 l 174 0 l 0 0 l 0 868 m 521 868 l 694 868 l 694 0 l 521 0 l 521 868 m 174 174 l 521 174 l 521 0 l 174 0 l 174 174 m 174 868 l 521 868 l 521 693 l 174 693 l 174 868 m 174 521 l 521 521 l 521 346 l 174 346 l 174 521 z "
					},
					9: {
						ha: 868,
						x_min: 0,
						x_max: 696,
						o: "m 0 521 l 696 521 l 696 346 l 0 346 l 0 521 m 0 868 l 694 868 l 694 694 l 0 694 l 0 868 m 0 696 l 175 696 l 175 519 l 0 519 l 0 696 m 521 696 l 694 696 l 694 521 l 521 521 l 521 696 m 521 349 l 696 349 l 696 -1 l 521 -1 l 521 349 m 174 174 l 521 174 l 521 -1 l 174 -1 l 174 174 z "
					},
					"+": {
						ha: 694,
						x_min: 0,
						x_max: 521,
						o: "m 174 174 l 347 174 l 347 347 l 521 347 l 521 521 l 347 521 l 347 694 l 174 694 l 174 521 l 0 521 l 0 347 l 174 347 l 174 174 z "
					},
					"了": {
						ha: 1389,
						x_min: 72,
						x_max: 1278,
						o: "m 659 954 q 1092 1246 891 1096 l 72 1246 l 72 1358 l 1278 1358 l 1278 1225 q 781 899 1035 1058 l 781 400 q 730 216 781 266 q 544 159 680 161 q 323 164 469 159 q 301 293 315 231 q 534 277 437 278 q 659 400 659 275 l 659 954 z "
					},
					"住": {
						ha: 1389,
						x_min: 18,
						x_max: 1364,
						o: "m 423 279 l 841 279 l 841 694 l 502 694 l 502 793 l 841 793 l 841 1122 l 464 1122 l 464 1221 l 1324 1221 l 1324 1122 l 949 1122 l 949 793 l 1286 793 l 1286 694 l 949 694 l 949 279 l 1364 279 l 1364 180 l 423 180 l 423 279 m 18 788 q 346 1462 235 1084 l 457 1430 q 339 1135 401 1274 l 339 129 l 233 129 l 233 926 q 64 670 152 783 q 18 788 45 730 m 773 1407 l 860 1462 q 996 1287 935 1373 l 897 1225 q 773 1407 837 1325 z "
					},
					"力": {
						ha: 1389,
						x_min: 30,
						x_max: 1265,
						o: "m 87 1154 l 526 1154 q 532 1458 530 1303 l 650 1458 q 643 1154 647 1314 l 1265 1154 q 1234 406 1249 625 q 985 170 1217 172 q 716 175 873 170 q 696 302 711 228 l 700 302 q 974 288 876 286 q 1119 433 1105 290 q 1143 1044 1135 677 l 640 1044 q 528 513 628 690 q 110 132 420 315 q 30 235 72 180 q 415 567 323 399 q 522 1044 510 720 l 87 1044 l 87 1154 z "
					},
					"太": {
						ha: 1389,
						x_min: 19,
						x_max: 1367,
						o: "m 19 229 q 616 1019 548 514 l 43 1019 l 43 1123 l 624 1123 q 629 1453 629 1260 l 747 1453 q 743 1123 747 1280 l 1344 1123 l 1344 1019 l 749 1019 q 1367 262 891 467 q 1270 155 1303 199 q 694 878 831 401 q 102 129 581 411 q 19 229 75 164 m 540 408 l 625 476 q 817 267 723 372 l 720 190 q 540 408 636 297 z "
					},
					"好": {
						ha: 1389,
						x_min: 24,
						x_max: 1370,
						o: "m 591 376 l 511 290 q 358 430 434 362 q 90 145 258 275 q 27 232 61 187 q 283 496 189 349 q 79 671 176 590 q 168 1073 127 842 l 24 1073 l 24 1173 l 184 1173 q 227 1459 206 1309 l 336 1444 q 290 1173 312 1295 l 547 1173 l 547 1086 q 414 521 515 718 q 591 376 503 449 m 545 849 l 918 849 l 918 1061 q 1165 1268 1053 1175 l 594 1268 l 594 1366 l 1314 1366 l 1314 1260 q 1025 1015 1168 1135 l 1025 849 l 1370 849 l 1370 751 l 1025 751 l 1025 316 q 850 152 1025 152 q 673 156 793 152 q 655 263 666 206 q 836 251 777 252 q 918 332 918 251 l 918 751 l 545 751 l 545 849 m 442 1073 l 271 1073 q 189 699 224 812 l 332 585 q 442 1073 423 774 z "
					},
					"很": {
						ha: 1389,
						x_min: 22,
						x_max: 1370,
						o: "m 552 1381 l 1248 1381 l 1248 716 l 1145 716 l 1145 750 l 886 750 q 1002 526 928 627 q 1248 688 1134 605 l 1313 604 q 1058 457 1188 528 q 1370 235 1183 323 q 1287 138 1331 191 q 785 750 902 370 l 655 750 l 655 297 q 899 408 753 336 q 921 308 909 351 q 658 175 825 267 q 579 117 617 151 l 507 210 q 552 316 552 254 l 552 1381 m 22 650 q 395 1111 245 842 l 488 1058 q 343 844 419 944 l 343 123 l 239 123 l 239 715 q 69 545 157 623 q 22 650 49 600 m 1145 1289 l 655 1289 l 655 1112 l 1145 1112 l 1145 1289 m 28 1070 q 376 1458 243 1234 l 469 1404 q 79 972 312 1164 q 28 1070 54 1024 m 655 841 l 1145 841 l 1145 1021 l 655 1021 l 655 841 z "
					},
					"快": {
						ha: 1389,
						x_min: 18,
						x_max: 1354,
						o: "m 407 779 l 768 779 q 783 1115 779 891 l 499 1115 l 499 1210 l 784 1210 q 784 1447 784 1317 l 891 1447 q 890 1210 891 1320 l 1221 1210 l 1221 779 l 1354 779 l 1354 684 l 914 684 q 1345 232 1025 374 q 1256 127 1312 199 q 840 623 948 302 q 442 117 758 317 q 363 208 397 175 q 754 684 688 399 l 407 684 l 407 779 m 209 1447 l 311 1447 l 311 1149 l 363 1184 q 515 994 452 1086 l 435 936 q 311 1108 376 1028 l 311 122 l 209 122 l 209 1447 m 1115 1115 l 888 1115 q 876 779 886 899 l 1115 779 l 1115 1115 m 77 1135 l 168 1122 q 109 776 148 959 q 18 798 71 785 q 77 1135 50 937 z "
					},
					"棒": {
						ha: 1389,
						x_min: 8,
						x_max: 1375,
						o: "m 487 423 l 837 423 l 837 557 l 605 557 l 605 636 q 456 517 538 574 q 385 595 434 545 q 654 841 556 701 l 449 841 l 449 926 l 705 926 q 749 1039 732 981 l 528 1039 l 528 1124 l 770 1124 q 789 1236 781 1177 l 488 1236 l 488 1321 l 798 1321 q 806 1457 803 1386 l 906 1457 q 898 1321 903 1386 l 1312 1321 l 1312 1236 l 888 1236 q 871 1124 882 1176 l 1275 1124 l 1275 1039 l 852 1039 q 814 926 838 982 l 1366 926 l 1366 841 l 1085 841 q 1375 621 1191 690 q 1313 530 1341 576 q 1161 632 1229 575 l 1161 557 l 936 557 l 936 423 l 1290 423 l 1290 338 l 936 338 l 936 122 l 837 122 l 837 338 l 487 338 l 487 423 m 8 609 q 206 1101 130 807 l 24 1101 l 24 1195 l 209 1195 l 209 1459 l 304 1459 l 304 1195 l 461 1195 l 461 1101 l 304 1101 l 304 869 l 353 909 q 472 769 419 834 l 401 711 q 304 840 359 772 l 304 123 l 209 123 l 209 886 q 52 490 141 642 q 8 609 34 549 m 837 760 l 936 760 l 936 643 l 1147 643 q 989 841 1050 730 l 770 841 q 612 643 709 736 l 837 643 l 837 760 z "
					},
					"稳": {
						ha: 1389,
						x_min: 7,
						x_max: 1386,
						o: "m 530 690 l 1183 690 l 1183 808 l 556 808 l 556 897 l 1183 897 l 1183 1013 l 559 1013 l 559 1099 l 540 1080 q 461 1146 506 1112 q 711 1469 614 1286 l 817 1449 q 749 1339 784 1393 l 1153 1339 l 1153 1252 q 1042 1104 1099 1179 l 1286 1104 l 1286 551 l 1183 551 l 1183 600 l 530 600 l 530 690 m 7 519 q 214 964 134 696 l 31 964 l 31 1058 l 222 1058 l 222 1275 q 58 1261 141 1268 q 39 1358 52 1303 q 484 1402 260 1371 l 506 1303 q 323 1284 415 1293 l 323 1058 l 492 1058 l 492 964 l 323 964 l 323 802 l 378 845 q 524 682 456 766 l 444 617 q 323 772 385 701 l 323 125 l 222 125 l 222 726 q 53 407 152 538 q 7 519 33 464 m 640 519 l 743 519 l 743 327 q 830 248 743 248 l 960 248 q 1061 316 1046 248 q 1081 442 1073 370 q 1184 401 1126 422 q 1154 274 1171 332 q 990 156 1124 156 l 810 156 q 640 321 640 156 l 640 519 m 1031 1251 l 689 1251 q 564 1104 629 1172 l 925 1104 q 1031 1251 982 1181 m 494 519 l 585 487 q 477 217 538 345 q 385 259 434 240 q 494 519 449 374 m 1177 477 l 1264 517 q 1386 274 1340 372 l 1293 229 q 1177 477 1248 339 m 795 544 l 868 594 q 1009 419 948 502 l 926 361 q 795 544 867 456 z "
					},
					"给": {
						ha: 1389,
						x_min: 18,
						x_max: 1378,
						o: "m 551 693 l 1237 693 l 1237 121 l 1134 121 l 1134 212 l 654 212 l 654 119 l 551 119 l 551 693 m 184 646 q 467 667 191 646 q 454 581 460 625 q 68 543 228 560 l 46 628 q 252 914 127 705 q 46 899 165 909 l 18 983 q 273 1450 134 1116 l 380 1412 q 136 991 247 1157 q 297 994 217 993 q 399 1180 346 1078 l 499 1137 q 184 646 311 823 m 1134 601 l 654 601 l 654 304 l 1134 304 l 1134 601 m 971 1450 l 943 1404 q 1378 975 1101 1145 q 1299 888 1339 936 q 886 1313 1034 1077 q 502 871 738 1063 q 423 945 476 901 q 850 1450 697 1154 l 971 1450 m 597 947 l 1191 947 l 1191 854 l 597 854 l 597 947 m 23 331 q 476 425 275 378 q 477 330 475 376 q 58 232 201 273 l 23 331 z "
					},
					"超": {
						ha: 1389,
						x_min: 23,
						x_max: 1370,
						o: "m 23 248 q 134 791 126 427 l 235 785 q 214 541 231 654 q 343 370 263 435 l 343 873 l 30 873 l 30 971 l 301 971 l 301 1166 l 77 1166 l 77 1264 l 301 1264 l 301 1457 l 407 1457 l 407 1264 l 609 1264 l 609 1166 l 407 1166 l 407 971 l 627 971 l 627 873 l 445 873 l 445 662 l 639 662 l 639 566 l 445 566 l 445 311 q 671 269 543 270 q 1370 274 929 264 q 1332 170 1345 214 q 637 172 922 167 q 193 408 309 180 q 83 121 153 232 q 23 248 56 184 m 711 836 l 1278 836 l 1278 351 l 1177 351 l 1177 410 l 811 410 l 811 343 l 711 343 l 711 836 m 644 1308 l 644 1398 l 1293 1398 q 1274 1086 1286 1214 q 1112 928 1259 932 q 943 932 1039 926 q 922 1039 935 981 q 1092 1024 1023 1023 q 1177 1111 1169 1024 q 1191 1308 1187 1190 l 933 1308 q 705 879 922 1001 q 640 964 680 921 q 831 1308 827 1067 l 644 1308 m 1177 745 l 811 745 l 811 500 l 1177 500 l 1177 745 z "
					},
					"越": {
						ha: 1389,
						x_min: 26,
						x_max: 1370,
						o: "m 26 233 q 134 791 130 422 l 228 785 q 213 538 227 652 q 339 373 262 435 l 339 873 l 30 873 l 30 966 l 298 966 l 298 1166 l 77 1166 l 77 1259 l 298 1259 l 298 1455 l 393 1455 l 393 1259 l 602 1259 l 602 1166 l 393 1166 l 393 966 l 624 966 l 624 873 l 434 873 l 434 658 l 608 658 l 608 566 l 434 566 l 434 315 q 666 269 534 270 q 1370 274 981 264 q 1332 168 1345 214 q 637 172 947 168 q 191 406 316 178 q 83 121 155 232 q 26 233 56 184 m 770 395 q 987 644 895 511 q 917 1112 933 829 l 758 1112 l 758 650 q 897 773 819 703 q 917 674 905 720 q 755 529 837 606 q 692 457 726 500 l 624 525 q 666 658 666 579 l 666 1200 l 913 1200 q 909 1459 909 1328 l 1001 1459 q 1005 1200 1000 1336 l 1340 1200 l 1340 1112 l 1009 1112 q 1058 750 1020 902 q 1180 1017 1133 878 l 1271 979 q 1093 632 1196 792 q 1154 507 1120 560 q 1202 467 1179 467 q 1230 517 1222 467 q 1253 726 1242 604 q 1347 692 1316 703 q 1318 471 1332 544 q 1215 355 1298 355 q 1088 431 1142 355 q 1027 538 1054 476 q 844 331 944 426 q 770 395 818 362 m 1074 1404 l 1145 1455 q 1278 1298 1203 1392 l 1199 1242 q 1074 1404 1130 1340 z "
					},
					"！": {
						ha: 1389,
						x_min: 608,
						x_max: 781,
						o: "m 761 1321 l 746 570 l 639 570 l 624 1321 l 761 1321 m 694 426 q 755 401 730 426 q 781 340 781 376 q 755 279 781 304 q 694 255 730 255 q 633 279 659 255 q 608 340 608 304 q 633 401 608 376 q 694 426 659 426 z "
					}
				},
				familyName: "Microsoft YaHei",
				ascender: 1636,
				descender: -296,
				underlinePosition: -119,
				underlineThickness: 80,
				boundingBox: {
					yMin: -186,
					xMin: -220,
					yMax: 1706,
					xMax: 1763
				},
				resolution: 1e3,
				original_font_information: {
					format: 0,
					copyright: "`2005 Microsoft Corporation. All rights reserved.",
					fontFamily: "Microsoft YaHei",
					fontSubfamily: "Regular",
					uniqueID: "Microsoft YaHei-Regular",
					fullName: "Microsoft YaHei",
					version: "Version 0.71",
					postScriptName: "MicrosoftYaHei",
					trademark: "Microsoft YaHei is either a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries.",
					manufacturer: "Microsoft Corporation",
					designer: "Founder",
					description: "Microsoft YaHei is a Simplified Chinese font developed by taking advantage of ClearType technology, and it provides excellent reading experience particularly onscreen. The font is very legible at small sizes.",
					manufacturerURL: "http://www.microsoft.com/typography",
					designerURL: "http://www.founder.com.cn/cn",
					licence: "\r\nNOTIFICATION OF LICENSE AGREEMENT \r\n\r\nThis font software is part of the Microsoft software product in which it was included and is provided under the end user license agreement (“EULA”) for that Microsoft software product. The terms and conditions of the EULA govern the use of font software. Please refer to the applicable Microsoft product EULA if you have any questions about how you may use this font software. Microsoft reserves all rights that are not expressly granted in the EULA. For products that may have installed this font please see the license link.\r\n",
					licenceURL: "http://www.microsoft.com/typography/fonts"
				},
				cssFontWeight: "normal",
				cssFontStyle: "normal"
			}), function (t) {
				n = t
			}), e.default = n
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}

			function r() {
				var t = Date.now(),
					e = t - j;
				j = t, requestAnimationFrame(r, !0), e > 100 || z.update(e / 1e3)
			}
			var a = function () {
				function t(t, e) {
					for (var i = 0; i < e.length; i++) {
						var n = e[i];
						n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
					}
				}
				return function (e, i, n) {
					return i && t(e.prototype, i), n && t(e, n), e
				}
			}();
			i(29);
			var o = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				s = n(i(11)),
				h = n(i(25)),
				l = n(i(28)),
				c = n(i(17)),
				u = n(i(12)),
				d = i(1),
				f = n(i(26)),
				p = n(i(24)),
				m = n(i(30)),
				g = n(i(2)),
				v = n(i(4)),
				y = n(i(5)),
				b = n(i(22)),
				x = n(i(19)),
				_ = n(i(20)),
				w = (n(i(21)), i(6)),
				M = n(i(27)),
				T = i(3),
				S = n(i(23)),
				E = n(i(18)),
				C = n(i(14)),
				P = n(i(16)),
				k = n(i(15)),
				A = i(8),
				L = n(i(13)),
				R = window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth,
				O = window.innerHeight < window.innerWidth ? window.innerHeight : window.innerWidth,
				I = wx.getSystemInfoSync() || {},
				B = "ios" == I.platform,
				U = I.model,
				D = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.options = e, this.is_from_wn = 0, this.firstInit = !0, this.distance = 0, this.heightestScore = 0, this.stage = "", this.succeedTime = 0, this.lastAddBonus = -2, this.lastStage = "", this.deadTimeout = null, this.currentScore = 0, this.seq = 0, this.thirdBlock = null, this.straight = !0, this.firstBlood = !1, this.lastHardLevel = 200, this.guider = !1, this.hardDistances = [], this.duration = [], this.quickArr = [], this.socketFirstSync = !1, this.init(), this.randomSeed = Date.now(), (0, A.setRandomSeed)(this.randomSeed), this.actionList = [], this.musicList = [], this.blocks = [], this.liveTime = 0, wx.setKeepScreenOn && wx.setKeepScreenOn({
							keepScreenOn: !0
						})
					}
					return a(t, [{
						key: "moveGradually",
						value: function (t, e) {
							if (this.animating && !this.guider) {
								(0, T.TweenAnimation)(this.bottle.obj.position.x, this.bottle.obj.position.x - t.x, 500 * e, "Linear", function (t, e) {
									this.bottle.obj.position.x = t, e && (this.bottle.obj.position.x = -.098)
								}.bind(this));
								for (var i = 0, n = this.blocksInUse.length; i < n; ++i)(0, T.TweenAnimation)(this.blocksInUse[i].obj.position.x, this.blocksInUse[i].obj.position.x - t.x, 500 * e, "Linear", function (t) {
									this.obj.position.x = t
								}.bind(this.blocksInUse[i]));
								this.blocks[0] && (0, T.TweenAnimation)(this.blocks[0].obj.position.x, this.blocks[0].obj.position.x - t.x, 500 * e, "Linear", function (t) {
									this.obj.position.x = t
								}.bind(this.blocks[0]))
							} else(0, T.TweenAnimation)(this.camera.position.x, this.camera.position.x + t.x, 500 * e, "Quad.easeOut", function (t) {
								this.camera.position.x = t
							}.bind(this)), (0, T.TweenAnimation)(this.camera.position.z, this.camera.position.z + t.z, 500 * e, "Quad.easeOut", function (t) {
								this.camera.position.z = t
							}.bind(this))
						}
					}, {
						key: "update",
						value: function (t) {
							var e = this;
							this.tailSystem && this.tailSystem.update(1e3 * t), this.bottle.update(t), this.UI.update(), this.renderer.shadowMap.enabled && (this.shadowTarget.position.x = this.bottle.obj.position.x, this.shadowTarget.position.z = this.bottle.obj.position.z, this.shadowLight.position.x = this.bottle.obj.position.x + 0, this.shadowLight.position.z = this.bottle.obj.position.z + 10);
							for (var i = 0, n = this.blocksInUse.length; i < n; ++i) this.blocksInUse[i].update();
							if (this.guider && this.blocks[0] && this.blocks[0].update(), ("forerake" === this.bottle.status || "hypsokinesis" === this.bottle.status) && 5 != this.hit)
								for (var r = this.bottle.getBox(), a = "forerake" === this.bottle.status ? this.nextBlock.getBox() : this.currentBlock.getBox(), i = 0, n = r.length; i < n; ++i)
									if (r[i].intersectsBox(a)) {
										0 == i ? (this.bottle.rotate(), this.suspendTimer && (clearTimeout(this.suspendTimer), this.suspendTimer = null)) : 1 == i ? (this.bottle.suspend(), this.suspendTimer && (clearTimeout(this.suspendTimer), this.suspendTimer = null)) : 2 != i || this.suspendTimer || (this.suspendTimer = setTimeout(function () {
											e.bottle.suspend(), e.suspendTimer = null
										}, 90 * this.distance));
										break
									}
							if (this.bottle.obj.position.y <= d.BLOCK.height / 2 + .1 && "jump" === this.bottle.status && this.bottle.flyingTime > .3 && !this.pendingReset) {
								if (1 === this.hit || 7 === this.hit) {
									if (this.bottle.stop(), this.succeed(), this.animating) return;
									1 === this.hit ? (this.audioManager["combo" + Math.min(this.doubleHit + 1, 8)].seek(0), this.audioManager["combo" + Math.min(this.doubleHit + 1, 8)].play(), ++this.doubleHit, this.addWave(Math.min(this.doubleHit, 4)), this.bottle.showAddScore(1, !0, this.quick), this.UI.addScore(1, !0, this.quick), this.currentScore = this.UI.score, "observe" != this.mode && this.showCombo()) : (this.doubleHit = 0, this.UI.addScore(1, !1, this.quick), this.currentScore = this.UI.score, this.bottle.showAddScore(1, !1, this.quick)), this.audioManager.success.seek(0), this.audioManager.success.play(), "observe" != this.mode && this.rankSystem.update()
								} else 2 === this.hit ? (this.bottle.stop(), this.bottle.obj.position.y = d.BLOCK.height / 2, this.bottle.obj.position.x = this.bottle.destination[0], this.bottle.obj.position.z = this.bottle.destination[1]) : 3 === this.hit ? (this.bottle.hypsokinesis(), this.audioManager.fall_2.play(), this.bottle.obj.position.y = d.BLOCK.height / 2) : 4 === this.hit || 5 === this.hit ? (this.bottle.forerake(), this.audioManager.fall_2.play(), this.bottle.obj.position.y = d.BLOCK.height / 2) : 0 === this.hit ? (this.bottle.fall(), this.audioManager.fall.play(), this.bottle.obj.position.y = d.BLOCK.height / 2) : 6 === this.hit ? (this.bottle.stop(), this.audioManager.fall.play(), this.bottle.obj.position.y = d.BLOCK.height / 2) : -1 === this.hit && (this.bottle.stop(), this.bottle.obj.position.y = d.BLOCK.height / 2, this.bottle.obj.position.x = 0);
								if (0 === this.hit || 3 === this.hit || 4 === this.hit || 5 === this.hit || 6 === this.hit) {
									if (this.guider)
										if (this.UI.score > 0) this.guider = !1;
										else {
											if (!(this.liveTime > 3)) return void this.live();
											this.guider = !1, this.full2D.hide2DGradually()
										}
									this.pendingReset = !0, this.currentScore = this.UI.score, this.gameCtrl.gameOver(this.currentScore), this.deadTimeout = setTimeout(function () {
										T.TweenAnimation.killAll(), e.gameCtrl.gameOverShowPage(), e.pendingReset = !1, "observe" == e.mode && e.instructionCtrl.onCmdComplete()
									}, 2e3)
								} else "observe" == this.mode && this.instructionCtrl.onCmdComplete()
							}
							this.renderer.render(this.scene, this.camera)
						}
					}, {
						key: "succeed",
						value: function () {
							var t = this;
							if (++this.succeedTime, this.musicScore = !1, this.lastSucceedTime = Date.now(), this.succeedTime % 15 == 0 && this.ground.changeColor(), !d.GAME.canShadow)
								for (var e = this.blocksInUse.length - 6; e >= 0; --e) this.blocksInUse[e].obj.visible = !1;
							if (this.blocksInUse.length >= 8) {
								var i = this.blocksInUse.shift();
								i.obj.visible = !1, this.blocksPool.push(i)
							}
							var n = this.nextBlock.obj.position.clone().sub(this.currentBlock.obj.position);
							this.bottle.obj.position.x = this.bottle.destination[0], this.bottle.obj.position.z = this.bottle.destination[1], this.bottle.squeeze();
							var r = this.thirdBlock;
							if (!this.firstAnimating) {
								if (this.guider && (this.guider = !1, this.full2D.hide2DGradually()), this.animating);
								else {
									if (15 == this.nextBlock.order) this.nextBlock.glow();
									else if (19 == this.nextBlock.order) {
										a = this.nextBlock;
										this.musicTimer = setTimeout(function () {
											t.audioManager.sing.seek(0), t.audioManager.sing.play(), a.playMusic(), t.musicScore = !0, t.UI.addScore(30, !1, !1), t.bottle.showAddScore(30, !1, !1)
										}, 2e3)
									} else if (24 == this.nextBlock.order) {
										a = this.nextBlock;
										this.audioManager.register("store", function () {
											a.openDoor()
										}, function () {
											a.closeDoor()
										}), this.musicTimer = setTimeout(function () {
											t.audioManager.store.seek(0), t.audioManager.store.play(), t.musicScore = !0, t.UI.addScore(15, !1, !1), t.bottle.showAddScore(15, !1, !1)
										}, 2e3)
									} else if (26 == this.nextBlock.order) this.musicTimer = setTimeout(function () {
										t.audioManager.water.seek(0), t.audioManager.water.play(), t.UI.addScore(5, !1, !1), t.musicScore = !0, t.bottle.showAddScore(5, !1, !1)
									}, 2e3);
									else if (17 == this.nextBlock.order) {
										var a = this.nextBlock;
										this.musicTimer = setTimeout(function () {
											a.rotateBox(), t.musicScore = !0, t.UI.addScore(10, !1, !1), t.bottle.showAddScore(10, !1, !1)
										}, 2e3)
									}
									var o = this.nextBlock.obj.position.clone(),
										s = this.nextBlock.radius + this.distance + r.radius;
									this.straight;
									this.straight ? (o.x += s, this.bottle.lookAt("straight", o.clone())) : (o.z -= s, this.bottle.lookAt("left", o.clone())), r.obj.position.x = o.x, r.obj.position.z = o.z, this.audioManager.pop.seek(0), this.audioManager.pop.play()
								}
								r.popup();
								var h = r.obj.position.clone().sub(this.nextBlock.obj.position),
									l = n.add(h);
								l.x /= 2, l.z /= 2, this.scene.add(r.obj), this.currentBlock = this.nextBlock, this.nextBlock = r;
								var c = l.length() / 10;
								d.GAME.canShadow && this.bottle.scatterParticles(), this.moveGradually(l, c), this.bottle.human.rotation.z = 0, this.bottle.human.rotation.x = 0
							}
						}
					}, {
						key: "handleWxOnHideEvent",
						value: function () {
							this.show = !1, this.animateTimer && (clearTimeout(this.animateTimer), this.animateTimer = null), this.onshowAnimateTimer && (clearTimeout(this.onshowAnimateTimer), this.onshowAnimateTimer = null), this.gameCtrl.wxOnhide()
						}
					}, {
						key: "init",
						value: function () {
							var t = this;
							v.default.getFirstBlood() || this.options.query.mode || (this.guider = !0), this.gameCtrl = new C.default(this), this.gameView = new P.default(this), this.gameModel = new k.default(this), this.instructionCtrl = new L.default(this), this.historyTimes = new S.default(this), this.reporter = new E.default, this.audioManager = new f.default, this.gameSocket = new x.default(this), this.scene = new o.Scene;
							var e = d.FRUSTUMSIZE,
								i = O / R;
							this.camera = new o.OrthographicCamera(e * i / -2, e * i / 2, e / 2, e / -2, -10, 85), this.camera.position.set(-17, 30, 26), this.camera.lookAt(new o.Vector3(13, 0, -4)), this.scene.add(this.camera), this.renderer = new o.WebGLRenderer({
								antialias: !0,
								canvas: canvas,
								preserveDrawingBuffer: !0
							}), this.blocksPool = [], this.blocksInUse = [], this.doubleHit = 0, B && (U.indexOf("iPhone 4") >= 0 || U.indexOf("iPhone 5") >= 0 || I.system.indexOf("iOS 9") >= 0 || I.system.indexOf("iOS 8") >= 0 || U.indexOf("iPhone 6") >= 0 && U.indexOf("iPhone 6s") < 0) ? (this.renderer.shadowMap.enabled = !1, d.GAME.canShadow = !1, this.renderer.setPixelRatio(1.5)) : void 0 !== I.benchmarkLevel && I.benchmarkLevel < 5 && -1 != I.benchmarkLevel ? (d.GAME.canShadow = !1, this.renderer.shadowMap.enabled = !1, this.renderer.setPixelRatio(window.devicePixelRatio ? B ? Math.min(window.devicePixelRatio, 2) : window.devicePixelRatio : 1)) : (this.renderer.setPixelRatio(window.devicePixelRatio ? B ? Math.min(window.devicePixelRatio, 2) : window.devicePixelRatio : 1), this.renderer.shadowMap.enabled = !0), this.renderer.setSize(O, R), this.renderer.localClippingEnabled = !0, this.ground = new c.default, this.ground.obj.position.z = -84, this.camera.add(this.ground.obj), this.waves = [];
							for (a = 0; a < 4; ++a) {
								var n = new l.default;
								this.waves.push(n), n.obj.visible = !1, this.scene.add(n.obj)
							}
							var r = new o.MeshBasicMaterial({
								color: 16119285
							});
							this.combo = new o.Mesh(new o.CircleGeometry(.6, 40), r), this.combo.name = "combo", this.combo.position.x = -50, this.combo.rotation.x = -Math.PI / 2, this.scene.add(this.combo), this.renderer.shadowMap.enabled && (this.shadowTarget = new o.Mesh(new o.PlaneGeometry(.1, .1), r), this.shadowTarget.visible = !1, this.shadowTarget.name = "shadowTarget", this.scene.add(this.shadowTarget)), this.currentBlock = new s.default(0), this.initNextBlock = this.nextBlock = new s.default(1), this.nextBlock.obj.position.x = 20, this.bottle = new u.default, this.bottle.obj.position.set(-10, -d.BLOCK.height / 2, 0), this.scene.add(this.bottle.obj), this.guider && (this.bottle.obj.position.set(-11, 50, 0), this.camera.position.x -= 19, setTimeout(function () {
								t.bottle.showup()
							}, 800), this.currentBlock.obj.position.x = -11, this.currentBlock.change(null, "gray", .7), this.scene.add(this.currentBlock.obj), this.guiderTimer = setInterval(function () {
								t.bottle.velocity.vz = 0, t.bottle.velocity.vy = 150, t.direction = new o.Vector2(1, 0);
								var e = new o.Vector3(1, 0, 0);
								t.bottle.jump(e.normalize()), t.hit = t.checkHit2(t.bottle, t.currentBlock)
							}, 3e3)), this.blocksInUse.push(this.nextBlock), this.blocksInUse.push(this.currentBlock);
							for (var a = 2; a < 30; ++a) {
								var m = new s.default(a);
								this.blocksPool.push(m)
							}
							this.full2D = new _.default({
								camera: this.camera,
								onClickRank: this.gameCtrl.clickRank.bind(this.gameCtrl),
								onClickReplay: this.gameCtrl.clickReplay.bind(this.gameCtrl),
								onClickShare: this.gameCtrl.shareBattleCard.bind(this.gameCtrl),
								onClickStart: this.gameCtrl.clickStart.bind(this.gameCtrl),
								onShowFriendRank: this.gameCtrl.showFriendRank.bind(this.gameCtrl),
								onBattlePlay: this.gameCtrl.onBattlePlay.bind(this.gameCtrl),
								onGroupShare: this.gameCtrl.shareGroupRank.bind(this.gameCtrl),
								friendRankReturn: this.gameCtrl.friendRankReturn.bind(this.gameCtrl),
								groupPlayGame: this.gameCtrl.groupPlayGame.bind(this.gameCtrl),
								onLookersStart: this.gameCtrl.onViewerStart.bind(this.gameCtrl),
								onReturnWechat: function () {
									wx.exitMiniProgram()
								},
								onClickPureShare: function (e) {
									(0, w.pureShare)(e, t.gameModel.currentScore)
								}
							}), this.UI = new h.default(this.scene, this.camera, this.full2D, this), d.GAME.canShadow && (this.tailSystem = new p.default(this.scene, this.bottle)), this.addLight(), this.bindEvent(), this.viewer = new M.default(this.camera), this.rankSystem = new b.default(this), this.audioManager.icon.play(), this.UI.hideScore(), this.gameModel.init(), this.gameCtrl.init(), this.gameView.init(), wx.onShow(this.handleWxOnShowEvent.bind(this)), wx.onHide(this.handleWxOnHideEvent.bind(this)), wx.onError(this.handleWxOnError.bind(this)), wx.onAudioInterruptionBegin && wx.onAudioInterruptionBegin(this.handleInterrupt.bind(this)), this.gameCtrl.firstInitGame(this.options)
						}
					}, {
						key: "loopAnimate",
						value: function () {
							var t = this;
							this.bottle.velocity.vz = Math.min(.7 * d.BOTTLE.velocityZIncrement, 180), this.bottle.velocity.vy = Math.min(d.BOTTLE.velocityY + .7 * d.BOTTLE.velocityYIncrement, 180);
							var e = new o.Vector3(this.nextBlock.obj.position.x - this.bottle.obj.position.x, 0, this.nextBlock.obj.position.z - this.bottle.obj.position.z);
							this.direction = new o.Vector2(this.nextBlock.obj.position.x - this.bottle.obj.position.x, this.nextBlock.obj.position.z - this.bottle.obj.position.z), this.hit = this.checkHit2(this.bottle, this.currentBlock, this.nextBlock), this.thirdBlock = this.generateNextBlock(), this.thirdBlock.obj.position.set(39.7, 0, 0), this.tailSystem && this.tailSystem.correctPosition(), this.bottle.jump(e.normalize()), this.animateTimer = setTimeout(function () {
								t.loopAnimate()
							}, 3e3)
						}
					}, {
						key: "animate",
						value: function () {
							var t = this;
							this.firstAnimating = !0;
							for (var e = this, i = 0; i < 7; ++i) setTimeout(function (t) {
								return function () {
									if (("single" == e.mode && ("startPage" == e.stage || "friendRankList" == e.stage) || e.guider) && e.blocks && e.blocks.length < 7) {
										var i = new s.default(-1, t);
										i.showup(t), e.scene.add(i.obj), e.blocks.push(i), 0 == t && (this.nextBlock = i)
									}
								}
							}(i), 200 * i);
							setTimeout(function () {
								if ("single" == e.mode && ("startPage" == e.stage || "friendRankList" == e.stage) || e.guider) {
									t.bottle.velocity.vz = Math.min(.4 * d.BOTTLE.velocityZIncrement, 180), t.bottle.velocity.vy = Math.min(d.BOTTLE.velocityY + .4 * d.BOTTLE.velocityYIncrement, 180), t.direction = new o.Vector2(t.nextBlock.obj.position.x - t.bottle.obj.position.x, t.nextBlock.obj.position.z - t.bottle.obj.position.z);
									var i = new o.Vector3(t.nextBlock.obj.position.x - t.bottle.obj.position.x, 0, t.nextBlock.obj.position.z - t.bottle.obj.position.z);
									t.bottle.jump(i.normalize()), t.hit = -1, t.nextBlock = t.initNextBlock;
									for (var n = 0, r = t.blocks.length; n < r; ++n) T.customAnimation.to(t.blocks[n].hitObj.material, 1, {
										opacity: 0,
										delay: .2 * n + .5
									});
									for (var n = 1, r = t.blocks.length; n < r; ++n) T.customAnimation.to(t.blocks[n].obj.position, .5, {
										z: n % 2 == 0 ? 60 : -60,
										delay: .1 * n + 2.2
									});
									if (t.guider) {
										T.customAnimation.to(t.currentBlock.obj.position, .5, {
											z: -60,
											delay: 2.1
										});
										var a = t.currentBlock;
										setTimeout(function () {
											a.obj.visible = !1
										}, 3e3)
									}
									t.currentBlock = t.blocks[0], setTimeout(function () {
										if ("single" == e.mode && ("startPage" == e.stage || "friendRankList" == e.stage) || e.guider) {
											e.guider && t.full2D.showBeginnerPage(), t.nextBlock.popup(), t.nextBlock.greenMaterial.color.setHex(6118749), t.nextBlock.whiteMaterial.color.setHex(11184810), t.scene.add(t.nextBlock.obj);
											for (var i = 1, n = t.blocks.length; i < n; ++i) t.blocks[i].obj.visible = !1;
											t.guider && (t.animating = !1), t.firstAnimating = !1
										}
									}, 3e3), setTimeout(function () {
										"single" != e.mode || "startPage" != e.stage && "friendRankList" != e.stage || e.show && t.loopAnimate()
									}, 4500)
								}
							}, 1500)
						}
					}, {
						key: "handleWxOnShowEvent",
						value: function (t) {
							var e = this;
							wx.setKeepScreenOn && wx.setKeepScreenOn({
								keepScreenOn: !0
							}), this.show = !0, this.reporter.enterReport(t.scene), this.guiderTimer && !this.guider && (clearInterval(this.guiderTimer), this.guiderTimer = null), this.onshowAnimateTimer = setTimeout(function (t) {
								return function () {
									"single" == e.mode && "startPage" == e.stage && !e.animateTimer && e.show && (e.blocks && e.blocks.length > 0 && !e.firstAnimating ? e.loopAnimate() : e.animating || !t || e.guider || (e.animating = !0, e.animate()))
								}
							}(this.firstInit), 1e3), this.firstInit ? this.firstInit = !1 : this.gameCtrl.wxOnShow(t)
						}
					}, {
						key: "showCombo",
						value: function () {
							var t = this;
							setTimeout(function () {
								t.combo.position.set(t.nextBlock.obj.position.x, d.BLOCK.height / 2 + .15, t.nextBlock.obj.position.z)
							}, 200)
						}
					}, {
						key: "hideCombo",
						value: function () {
							this.combo.position.set(-30, 0, 0)
						}
					}, {
						key: "replayGame",
						value: function (t) {
							this.currentScore = 0, this.gameCtrl.onReplayGame(), this.audioManager.restart.seek(0), this.audioManager.restart.play(), this.guider ? (this.guiderTimer && (clearInterval(this.guiderTimer), this.guiderTimer = null), this.animating = !0, this.animate(), this.moveGradually(new o.Vector3(19, 0, 0), 3)) : (this.resetScene(t), this.bottle.showup())
						}
					}, {
						key: "addWave",
						value: function (t) {
							for (var e = this, i = 0; i < t; ++i) setTimeout(function (t) {
								return function () {
									e.waves[t].obj.visible = !0, e.waves[t].obj.position.set(e.bottle.obj.position.x, d.BLOCK.height / 2 + .1 * t + 1, e.bottle.obj.position.z), (0, T.TweenAnimation)(e.waves[t].obj.scale.x, 4, 2 / (t / 2.5 + 2) * 500, "Linear", function (i, n) {
										e.waves[t].obj.scale.x = i, e.waves[t].obj.scale.y = i, e.waves[t].obj.scale.z = i
									}), (0, T.TweenAnimation)(e.waves[t].obj.material.opacity, 0, 2 / (t / 2.5 + 2) * 500, "Linear", function (i, n) {
										e.waves[t].obj.material.opacity = i, n && e.waves[t].reset()
									})
								}
							}(i), 200 * i)
						}
					}, {
						key: "addLight",
						value: function () {
							var t = new o.AmbientLight(16777215, .8);
							if (this.shadowLight = new o.DirectionalLight(16777215, .28), this.shadowLight.position.set(0, 15, 10), this.renderer.shadowMap.enabled) {
								this.shadowLight.castShadow = !0, this.shadowLight.target = this.shadowTarget, this.shadowLight.shadow.camera.near = 5, this.shadowLight.shadow.camera.far = 30, this.shadowLight.shadow.camera.left = -10, this.shadowLight.shadow.camera.right = 10, this.shadowLight.shadow.camera.top = 10, this.shadowLight.shadow.camera.bottom = -10, this.shadowLight.shadow.mapSize.width = 512, this.shadowLight.shadow.mapSize.height = 512;
								var e = new o.PlaneGeometry(65, 25);
								this.shadowGround = new o.Mesh(e, new o.ShadowMaterial({
									transparent: !0,
									color: 0,
									opacity: .3
								})), this.shadowGround.receiveShadow = !0, this.shadowGround.position.x = -25, this.shadowGround.position.y = -18, this.shadowGround.position.z = -15, this.shadowGround.rotation.x = -Math.PI / 2, this.shadowLight.add(this.shadowGround)
							}
							this.scene.add(this.shadowLight), this.scene.add(t)
						}
					}, {
						key: "checkHit2",
						value: function (t, e, i, n) {
							var r = t.velocity.vy / d.GAME.gravity * 2;
							n = n || +t.obj.position.y.toFixed(2);
							var a = d.BLOCK.height / 2 - n;
							r -= (-t.velocity.vy + Math.sqrt(Math.pow(t.velocity.vy, 2) - 2 * d.GAME.gravity * a)) / -d.GAME.gravity;
							var s = [],
								h = new o.Vector2(t.obj.position.x, t.obj.position.z),
								l = this.direction.setLength(t.velocity.vz * r);
							if (h.add(l), t.destination = [h.x, h.y], s.push(h.x, h.y), this.animating) return 7;
							if (i) {
								var c, u = Math.pow(s[0] - i.obj.position.x, 2) + Math.pow(s[1] - i.obj.position.z, 2),
									f = i.getVertices();
								if ((0, m.default)(s, f)) return Math.abs(u) < .5 ? 1 : 7;
								(0, m.default)([s[0] - d.BOTTLE.bodyWidth / 2, s[1]], f) || (0, m.default)([s[0], s[1] + d.BOTTLE.bodyDepth / 2], f) ? c = 5: ((0, m.default)([s[0], s[1] - d.BOTTLE.bodyDepth / 2], f) || (0, m.default)([s[0] + d.BOTTLE.bodyDepth / 2, s[1]], f)) && (c = 3)
							}
							var p = e.getVertices();
							return (0, m.default)(s, p) ? 2 : (0, m.default)([s[0], s[1] + d.BOTTLE.bodyDepth / 2], p) || (0, m.default)([s[0] - d.BOTTLE.bodyWidth / 2, s[1]], p) ? c ? 6 : 4 : c || void 0 || 0
						}
					}, {
						key: "shuffleArray",
						value: function (t) {
							for (var e = t.length - 1; e > 0; e--) {
								var i = Math.floor((0, A.random)() * (e + 1)),
									n = t[e];
								t[e] = t[i], t[i] = n
							}
						}
					}, {
						key: "generateNextBlock",
						value: function () {
							var t, e = 5;
							this.UI.score > 1e3 ? e = 6 : this.succeedTime > 3e3 && (e = 7), this.animating || this.shuffleArray(this.blocksPool);
							for (var i = 0, n = this.blocksPool.length; i < n; ++i)
								if (this.succeedTime - this.lastAddBonus >= e && this.blocksPool[i].order >= 13 || this.succeedTime - this.lastAddBonus < e && this.blocksPool[i].order < 13) {
									if ((t = this.blocksPool[i]).order >= 13) {
										if (this.lastBonusOrder && this.lastBonusOrder == t.order || this.UI.score < 100 && 29 == t.order) continue;
										this.lastAddBonus = this.succeedTime, this.lastBonusOrder = t.order
									}
									this.blocksInUse.push(t), this.blocksPool.splice(i, 1);
									break
								}
							if (!t) {
								for (var r = this.blocksInUse.shift(); r.order >= 13;) r.obj.visible = !1, this.blocksPool.push(r), r = this.blocksInUse.shift();
								t = r, this.blocksInUse.push(t)
							}
							return t.obj.visible = !1, t.change(), t
						}
					}, {
						key: "live",
						value: function () {
							var t = this;
							++this.liveTime, this.firstAnimating = !1, this.animateTimer && (clearTimeout(this.animateTimer), this.animateTimer = null), T.TweenAnimation.killAll(), this.animating = !1, d.BLOCK.minRadiusScale = .8, d.BLOCK.maxRadiusScale = 1, d.BLOCK.minDistance = 1, d.BLOCK.maxDistance = 17, setTimeout(function () {
								t.bottle.reset(), t.bottle.obj.position.x = 0, t.bottle.showup()
							}, 2e3), this.actionList = [], this.musicList = [], wx.triggerGC && wx.triggerGC()
						}
					}, {
						key: "resetScene",
						value: function (t) {
							this.firstAnimating = !1;
							for (var e = 0, i = this.blocks.length; e < i; ++e) this.scene.remove(this.blocks[e].obj);
							this.blocks = [], "observe" == this.mode && (this.audioManager.scale_intro.stop(), this.audioManager.scale_loop.stop()), this.randomSeed = t || Date.now(), (0, A.setRandomSeed)(this.randomSeed), this.actionList = [], this.musicList = [], this.animateTimer && (clearTimeout(this.animateTimer), this.animateTimer = null), this.currentBlock && this.currentBlock.reset(), T.TweenAnimation.killAll(), this.animating = !1, d.BLOCK.minRadiusScale = .8, d.BLOCK.maxRadiusScale = 1, d.BLOCK.minDistance = 1, d.BLOCK.maxDistance = 17;
							for (var e = 0, i = this.blocksInUse.length; e < i; ++e) {
								var n = this.blocksInUse.pop();
								n.obj.visible = !1, n.reset(), this.blocksPool.push(n)
							}
							for (var e = 0, i = this.waves.length; e < i; ++e) this.waves[e].reset();
							this.blocksPool.sort(function (t, e) {
								return t.order - e.order
							}), this.currentBlock = this.blocksPool.shift(), this.currentBlock.obj.visible = !0, this.scene.add(this.currentBlock.obj), this.blocksInUse.push(this.currentBlock), this.shadowTarget && this.shadowTarget.position.set(0, 0, 0), this.nextBlock = this.blocksPool.shift(), this.currentBlock.change(null, null, 1), this.nextBlock.change(null, null, 1), this.nextBlock.obj.position.set(20, 0, 0), this.currentBlock.obj.position.set(0, 0, 0), this.nextBlock.obj.visible = !0, this.scene.add(this.nextBlock.obj), this.blocksInUse.push(this.nextBlock), this.bottle.reset(), this.thirdBlock = null, this.UI.reset(), this.rankSystem.reset(), this.lastAddBonus = -2, this.succeedTime = 0, this.doubleHit = 0, this.camera.position.set(-17, 30, 26), this.shadowLight.position.set(0, 15, 10), wx.triggerGC && wx.triggerGC()
						}
					}, {
						key: "generateHardDistances",
						value: function () {
							for (var t = 2 + Math.floor(2 * (0, A.random)()), e = [], i = 0; i < t; ++i) i < t - 1 ? e.push(d.BLOCK.minDistance + 2 * (0, A.random)()) : e.push(d.BLOCK.maxDistance - 2 * (0, A.random)());
							return e
						}
					}, {
						key: "bindEvent",
						value: function () {
							var t = this;
							t.instructionCtrl.bindCmdHandler(function (e) {
								if (-1 == e.type) return t.gameCtrl.showPlayerGG(e.s), void t.instructionCtrl.onCmdComplete();
								if (0 == e.type) return t.socketFirstSync = !0, t.bottle.reset(), t.UI.scoreText.changeStyle({
									textAlign: "center"
								}), t.UI.setScore(0), void t.instructionCtrl.onCmdComplete();
								if (t.gameCtrl.showPlayerWaiting(), e.score != t.UI.score && (t.UI.score = e.score, t.UI.setScore(e.score)), e && e.b && e.b.vy) {
									if (t.socketFirstSync && (t.socketFirstSync = !1, t.camera.position.set(e.ca.x, e.ca.y, e.ca.z), t.ground.obj.position.set(e.gd.x, e.gd.y, e.gd.z)), t.currentBlock.order != e.c.order || t.nextBlock.order != e.n.order) {
										for (var i = 0, n = t.blocksInUse.length; i < n; ++i) {
											var r = t.blocksInUse.pop();
											t.scene.remove(r.obj), t.blocksPool.push(r)
										}
										var a = t.blocksPool.findIndex(function (t) {
											return t.order == e.c.order
										});
										t.currentBlock = t.blocksPool[a];
										c = t.blocksPool.splice(a, 1);
										t.blocksInUse.push(c[0]);
										var s = t.blocksPool.findIndex(function (t) {
											return t.order == e.n.order
										});
										t.nextBlock = t.blocksPool[s];
										c = t.blocksPool.splice(s, 1);
										t.blocksInUse.push(c[0])
									}
									t.scene.add(t.currentBlock.obj), t.scene.add(t.nextBlock.obj), t.currentBlock.obj.visible = !0, t.nextBlock.obj.visible = !0, t.currentBlock.obj.position.x = e.c.x, t.currentBlock.obj.position.z = e.c.z, t.currentBlock.change(e.c.r, e.c.type, e.c.rs), t.nextBlock.obj.position.x = e.n.x, t.nextBlock.obj.position.z = e.n.z, t.nextBlock.change(e.n.r, e.n.type, e.n.rs), t.bottle.obj.position.set(e.b.x, d.BLOCK.height / 2, e.b.z), t.bottle.velocity.vz = e.b.vz, t.bottle.velocity.vy = e.b.vy, t.distance = e.di, t.straight = e.s;
									var h = new o.Vector3(t.nextBlock.obj.position.x - t.bottle.obj.position.x, 0, t.nextBlock.obj.position.z - t.bottle.obj.position.z);
									if (t.direction = new o.Vector2(t.nextBlock.obj.position.x - t.bottle.obj.position.x, t.nextBlock.obj.position.z - t.bottle.obj.position.z), t.checkHit2(t.bottle, t.currentBlock, t.nextBlock, e.b.y), t.quick = e.q, e.t) {
										var l = t.blocksPool.findIndex(function (t) {
											return t.order == e.t.order
										});
										if (l > -1) {
											t.thirdBlock = t.blocksPool[l];
											var c = t.blocksPool.splice(l, 1);
											t.blocksInUse.push(t.thirdBlock)
										} else t.thirdBlock = t.blocksInUse.find(function (t) {
											return t.order == e.t.order
										}), t.scene.remove(t.thirdBlock.obj);
										t.thirdBlock.change(e.t.r, e.t.type, e.t.rs)
									}
									t.hit = e.h, t.tailSystem && t.tailSystem.correctPosition(), t.audioManager.scale_intro.seek(0), t.audioManager.scale_intro.play(), t.bottle.prepare(), t.currentBlock.shrink();
									var u = {
											x: e.ca.x,
											y: e.ca.y,
											z: e.ca.z
										},
										f = {
											x: e.gd.x,
											y: e.gd.y,
											z: e.gd.z
										};
									t.stopBlockMusic(), t.instructionCtrl.icTimeout = setTimeout(function () {
										t.audioManager.scale_intro.stop(), t.audioManager.scale_loop.stop(), 15 == t.currentBlock.order && t.currentBlock.hideGlow(), t.currentBlock.rebound(), t.camera.position.set(u.x, u.y, u.z), t.ground.obj.position.set(f.x, f.y, f.z), u = null, f = null, t.bottle.jump(h.normalize())
									}, 1e3 * e.d), e = null
								} else t.instructionCtrl.onCmdComplete()
							}), t.gameSocket.onReciveCommand(function (e, i) {
								"observe" == t.mode && t.instructionCtrl.onReceiveCommand(i, e)
							}), t.gameSocket.onPeopleCome(function (e) {
								t.gameCtrl.onPeopleCome(e)
							}), t.gameSocket.onPlayerOut(function () {
								t.gameCtrl.onPlayerOut()
							}), t.gameSocket.onJoinSuccess(function (e) {
								t.gameCtrl.socketJoinSuccess(e), "observe" == t.mode && (t.bottle.obj.position.set(8, -d.BLOCK.height / 2, 0), t.camera.position.set(-17, 30, 26), t.shadowLight.position.set(0, 15, 10), t.currentBlock && (t.currentBlock.obj.visible = !1), t.nextBlock && (t.nextBlock.obj.visible = !1))
							}), canvas.addEventListener("touchstart", function (e) {
								if (!("single" != t.mode && "player" != t.mode || "game" != t.stage || t.is_from_wn || t.guider) && e.changedTouches[0].clientX < .13 * O && e.changedTouches[0].clientY > .88 * R) t.gameCtrl.shareObservCard();
								else if ("friendRankList" != t.stage && "battlePage" != t.stage && "groupRankList" != t.stage && "singleSettlementPgae" != t.stage && "startPage" != t.stage)
									if ("viewerWaiting" != t.stage && "viewerGG" != t.stage && "viewerOut" != t.stage)
										if ("game" != t.stage);
										else {
											if ("observe" === t.mode) return;
											"stop" !== t.bottle.status || t.pendingReset || t.guider && t.animating || (t.stopBlockMusic(), t.audioManager.scale_intro.seek(0), t.audioManager.scale_intro.play(), t.bottle.prepare(), t.currentBlock.shrink(), t.mouseDownTime = Date.now())
										}
								else t.full2D.doTouchEndEvent(e);
								else t.full2D.doTouchStartEvent(e)
							});
							canvas.addEventListener("touchend", function (e) {
								e.changedTouches[0].clientX, e.changedTouches[0].clientY;
								if ("singleSettlementPgae" != t.stage && "startPage" != t.stage)
									if ("viewerWaiting" != t.stage && "viewerGG" != t.stage && "viewerOut" != t.stage)
										if ("friendRankList" != t.stage)
											if ("battlePage" != t.stage) {
												if ("groupRankList" == t.stage && t.full2D.doTouchEndEvent(e), "game" == t.stage && !("prepare" !== t.bottle.status || t.pendingReset || t.guider && t.animating)) {
													t.audioManager.scale_intro.stop(), t.audioManager.scale_loop.stop(), t.currentBlock.rebound();
													var i = (Date.now() - t.mouseDownTime) / 1e3;
													t.bottle.velocity.vz = Math.min(i * d.BOTTLE.velocityZIncrement, 150), t.bottle.velocity.vy = Math.min(d.BOTTLE.velocityY + i * d.BOTTLE.velocityYIncrement, 180);
													var n = new o.Vector3(t.nextBlock.obj.position.x - t.bottle.obj.position.x, 0, t.nextBlock.obj.position.z - t.bottle.obj.position.z);
													if (t.direction = new o.Vector2(t.nextBlock.obj.position.x - t.bottle.obj.position.x, t.nextBlock.obj.position.z - t.bottle.obj.position.z), t.bottle.jump(n.normalize()), t.hideCombo(), t.hit = t.checkHit2(t.bottle, t.currentBlock, t.nextBlock), 15 == t.currentBlock.order && t.currentBlock.hideGlow(), t.distance = d.BLOCK.minDistance + (0, A.random)() * (d.BLOCK.maxDistance - d.BLOCK.minDistance), t.straight = (0, A.random)() > .5 ? 1 : 0, 1 === t.hit || 7 === t.hit) {
														var r = t.generateNextBlock();
														t.thirdBlock = r, t.quick = Date.now() - t.lastSucceedTime < 800 || !1, t.quickArr.push(t.quick), "player" === t.mode && (++t.seq, t.gameSocket.sendCommand(t.seq, {
															type: 1,
															c: {
																x: t.currentBlock.obj.position.x,
																z: t.currentBlock.obj.position.z,
																order: t.currentBlock.order,
																type: t.currentBlock.type,
																r: t.currentBlock.radius,
																rs: t.currentBlock.radiusScale
															},
															n: {
																x: t.nextBlock.obj.position.x,
																z: t.nextBlock.obj.position.z,
																order: t.nextBlock.order,
																type: t.nextBlock.type,
																r: t.nextBlock.radius,
																rs: t.nextBlock.radiusScale
															},
															d: i,
															b: {
																x: t.bottle.obj.position.x,
																y: +t.bottle.obj.position.y.toFixed(2),
																z: t.bottle.obj.position.z,
																vy: t.bottle.velocity.vy,
																vz: t.bottle.velocity.vz
															},
															t: {
																order: t.thirdBlock.order,
																type: t.thirdBlock.type,
																r: t.thirdBlock.radius,
																rs: t.thirdBlock.radiusScale
															},
															h: t.hit,
															di: t.distance,
															s: t.straight,
															q: t.quick,
															ca: {
																x: t.camera.position.x,
																y: t.camera.position.y,
																z: t.camera.position.z
															},
															gd: {
																x: t.ground.obj.position.x,
																y: t.ground.obj.position.y,
																z: t.ground.obj.position.z
															},
															score: t.UI.score
														}))
													} else "player" === t.mode && (++t.seq, t.gameSocket.sendCommand(t.seq, {
														type: 1,
														c: {
															x: t.currentBlock.obj.position.x,
															z: t.currentBlock.obj.position.z,
															order: t.currentBlock.order,
															type: t.currentBlock.type,
															r: t.currentBlock.radius,
															rs: t.currentBlock.radiusScale
														},
														n: {
															x: t.nextBlock.obj.position.x,
															z: t.nextBlock.obj.position.z,
															order: t.nextBlock.order,
															type: t.nextBlock.type,
															r: t.nextBlock.radius,
															rs: t.nextBlock.radiusScale
														},
														d: i,
														b: {
															x: t.bottle.obj.position.x,
															y: +t.bottle.obj.position.y.toFixed(2),
															z: t.bottle.obj.position.z,
															vy: t.bottle.velocity.vy,
															vz: t.bottle.velocity.vz
														},
														h: t.hit,
														di: t.distance,
														s: t.straight,
														q: t.quick,
														ca: {
															x: t.camera.position.x,
															y: t.camera.position.y,
															z: t.camera.position.z
														},
														gd: {
															x: t.ground.obj.position.x,
															y: t.ground.obj.position.y,
															z: t.ground.obj.position.z
														},
														score: t.UI.score
													}));
													"observe" != t.mode && (t.actionList.push([i, +t.bottle.obj.position.y.toFixed(2), t.quick]), t.musicList.push(t.musicScore))
												}
											} else t.full2D.doTouchEndEvent(e);
								else t.full2D.doTouchEndEvent(e);
								else t.full2D.doTouchEndEvent(e);
								else t.full2D.doTouchEndEvent(e)
							}), canvas.addEventListener("touchmove", function (e) {
								"battlePage" != t.stage && "friendRankList" != t.stage && "groupRankList" != t.stage || t.full2D.doTouchMoveEvent(e)
							})
						}
					}, {
						key: "stopBlockMusic",
						value: function () {
							19 == this.currentBlock.order ? (this.audioManager.sing.stop(), this.currentBlock.stopMusic()) : 24 == this.currentBlock.order ? (this.audioManager.store.stop(), this.currentBlock.closeDoor()) : 26 == this.currentBlock.order && this.audioManager.water.stop(), this.audioManager.clearTimer(), this.musicTimer && (clearTimeout(this.musicTimer), this.musicTimer = null)
						}
					}, {
						key: "handleNetworkFucked",
						value: function (t) {
							var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "网络异常,点击确定进入游戏";
							this.rollBackToSingle(), t && wx.showModal({
								title: "提示",
								content: e,
								showCancel: !1
							})
						}
					}, {
						key: "handleSocketFucked",
						value: function () {
							this.gameSocket.close(), "player" == this.mode && (this.shareObservCardFail(), this.updateUI()), "observe" == this.mode && this.handleNetworkFucked(!0)
						}
					}, {
						key: "handleInterrupt",
						value: function () {
							"prepare" == this.bottle.status && (this.bottle.stopPrepare(), this.currentBlock.reset())
						}
					}, {
						key: "handleWxOnError",
						value: function (t) {
							var e = (void 0 == y.default.serverConfig.bad_js_ratio ? 1e6 : y.default.serverConfig.bad_js_ratio) / 1e6 || 1;
							Math.random() <= e && g.default.badReport(t.message, t.stack)
						}
					}, {
						key: "sendServerError",
						value: function (t) {
							g.default.sendServerError(t)
						}
					}]), t
				}();
			if (wx.getLaunchOptionsSync) z = new D(wx.getLaunchOptionsSync());
			else var z = new D;
			var j = Date.now(),
				N = requestAnimationFrame,
				F = [],
				G = void 0;
			window.requestAnimationFrame = function (t, e) {
					e ? G = t : F.push(t)
				},
				function t() {
					var e = [],
						i = G;
					F.forEach(function (t) {
						e.push(t)
					}), G = void 0, F.length = 0, e.forEach(function (t) {
						"function" == typeof t && t()
					}), "function" == typeof i && i(), N(t)
				}(), r()
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = n || function (t, e) {
				var i = {},
					n = i.lib = {},
					r = function () {},
					a = n.Base = {
						extend: function (t) {
							r.prototype = this;
							var e = new r;
							return t && e.mixIn(t), e.hasOwnProperty("init") || (e.init = function () {
								e.$super.init.apply(this, arguments)
							}), e.init.prototype = e, e.$super = this, e
						},
						create: function () {
							var t = this.extend();
							return t.init.apply(t, arguments), t
						},
						init: function () {},
						mixIn: function (t) {
							for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]);
							t.hasOwnProperty("toString") && (this.toString = t.toString)
						},
						clone: function () {
							return this.init.prototype.extend(this)
						}
					},
					o = n.WordArray = a.extend({
						init: function (t, e) {
							t = this.words = t || [], this.sigBytes = void 0 != e ? e : 4 * t.length
						},
						toString: function (t) {
							return (t || h).stringify(this)
						},
						concat: function (t) {
							var e = this.words,
								i = t.words,
								n = this.sigBytes;
							if (t = t.sigBytes, this.clamp(), n % 4)
								for (var r = 0; r < t; r++) e[n + r >>> 2] |= (i[r >>> 2] >>> 24 - r % 4 * 8 & 255) << 24 - (n + r) % 4 * 8;
							else if (65535 < i.length)
								for (r = 0; r < t; r += 4) e[n + r >>> 2] = i[r >>> 2];
							else e.push.apply(e, i);
							return this.sigBytes += t, this
						},
						clamp: function () {
							var e = this.words,
								i = this.sigBytes;
							e[i >>> 2] &= 4294967295 << 32 - i % 4 * 8, e.length = t.ceil(i / 4)
						},
						clone: function () {
							var t = a.clone.call(this);
							return t.words = this.words.slice(0), t
						},
						random: function (e) {
							for (var i = [], n = 0; n < e; n += 4) i.push(4294967296 * t.random() | 0);
							return new o.init(i, e)
						}
					}),
					s = i.enc = {},
					h = s.Hex = {
						stringify: function (t) {
							var e = t.words;
							t = t.sigBytes;
							for (var i = [], n = 0; n < t; n++) {
								var r = e[n >>> 2] >>> 24 - n % 4 * 8 & 255;
								i.push((r >>> 4).toString(16)), i.push((15 & r).toString(16))
							}
							return i.join("")
						},
						parse: function (t) {
							for (var e = t.length, i = [], n = 0; n < e; n += 2) i[n >>> 3] |= parseInt(t.substr(n, 2), 16) << 24 - n % 8 * 4;
							return new o.init(i, e / 2)
						}
					},
					l = s.Latin1 = {
						stringify: function (t) {
							var e = t.words;
							t = t.sigBytes;
							for (var i = [], n = 0; n < t; n++) i.push(String.fromCharCode(e[n >>> 2] >>> 24 - n % 4 * 8 & 255));
							return i.join("")
						},
						parse: function (t) {
							for (var e = t.length, i = [], n = 0; n < e; n++) i[n >>> 2] |= (255 & t.charCodeAt(n)) << 24 - n % 4 * 8;
							return new o.init(i, e)
						}
					},
					c = s.Utf8 = {
						stringify: function (t) {
							try {
								return decodeURIComponent(escape(l.stringify(t)))
							} catch (t) {
								throw Error("Malformed UTF-8 data")
							}
						},
						parse: function (t) {
							return l.parse(unescape(encodeURIComponent(t)))
						}
					},
					u = n.BufferedBlockAlgorithm = a.extend({
						reset: function () {
							this._data = new o.init, this._nDataBytes = 0
						},
						_append: function (t) {
							"string" == typeof t && (t = c.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes
						},
						_process: function (e) {
							var i = this._data,
								n = i.words,
								r = i.sigBytes,
								a = this.blockSize,
								s = r / (4 * a);
							if (e = (s = e ? t.ceil(s) : t.max((0 | s) - this._minBufferSize, 0)) * a, r = t.min(4 * e, r), e) {
								for (var h = 0; h < e; h += a) this._doProcessBlock(n, h);
								h = n.splice(0, e), i.sigBytes -= r
							}
							return new o.init(h, r)
						},
						clone: function () {
							var t = a.clone.call(this);
							return t._data = this._data.clone(), t
						},
						_minBufferSize: 0
					});
				n.Hasher = u.extend({
					cfg: a.extend(),
					init: function (t) {
						this.cfg = this.cfg.extend(t), this.reset()
					},
					reset: function () {
						u.reset.call(this), this._doReset()
					},
					update: function (t) {
						return this._append(t), this._process(), this
					},
					finalize: function (t) {
						return t && this._append(t), this._doFinalize()
					},
					blockSize: 16,
					_createHelper: function (t) {
						return function (e, i) {
							return new t.init(i).finalize(e)
						}
					},
					_createHmacHelper: function (t) {
						return function (e, i) {
							return new d.HMAC.init(t, i).finalize(e)
						}
					}
				});
				var d = i.algo = {};
				return i
			}(Math);
			! function () {
				var t = n,
					e = t.lib.WordArray;
				t.enc.Base64 = {
					stringify: function (t) {
						var e = t.words,
							i = t.sigBytes,
							n = this._map;
						t.clamp(), t = [];
						for (var r = 0; r < i; r += 3)
							for (var a = (e[r >>> 2] >>> 24 - r % 4 * 8 & 255) << 16 | (e[r + 1 >>> 2] >>> 24 - (r + 1) % 4 * 8 & 255) << 8 | e[r + 2 >>> 2] >>> 24 - (r + 2) % 4 * 8 & 255, o = 0; 4 > o && r + .75 * o < i; o++) t.push(n.charAt(a >>> 6 * (3 - o) & 63));
						if (e = n.charAt(64))
							for (; t.length % 4;) t.push(e);
						return t.join("")
					},
					parse: function (t) {
						var i = t.length,
							n = this._map;
						(r = n.charAt(64)) && -1 != (r = t.indexOf(r)) && (i = r);
						for (var r = [], a = 0, o = 0; o < i; o++)
							if (o % 4) {
								var s = n.indexOf(t.charAt(o - 1)) << o % 4 * 2,
									h = n.indexOf(t.charAt(o)) >>> 6 - o % 4 * 2;
								r[a >>> 2] |= (s | h) << 24 - a % 4 * 8, a++
							}
						return e.create(r, a)
					},
					_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
				}
			}(),
			function (t) {
				function e(t, e, i, n, r, a, o) {
					return ((t = t + (e & i | ~e & n) + r + o) << a | t >>> 32 - a) + e
				}

				function i(t, e, i, n, r, a, o) {
					return ((t = t + (e & n | i & ~n) + r + o) << a | t >>> 32 - a) + e
				}

				function r(t, e, i, n, r, a, o) {
					return ((t = t + (e ^ i ^ n) + r + o) << a | t >>> 32 - a) + e
				}

				function a(t, e, i, n, r, a, o) {
					return ((t = t + (i ^ (e | ~n)) + r + o) << a | t >>> 32 - a) + e
				}
				for (var o = n, s = (l = o.lib).WordArray, h = l.Hasher, l = o.algo, c = [], u = 0; 64 > u; u++) c[u] = 4294967296 * t.abs(t.sin(u + 1)) | 0;
				l = l.MD5 = h.extend({
					_doReset: function () {
						this._hash = new s.init([1732584193, 4023233417, 2562383102, 271733878])
					},
					_doProcessBlock: function (t, n) {
						for (o = 0; 16 > o; o++) {
							h = t[s = n + o];
							t[s] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8)
						}
						var o = this._hash.words,
							s = t[n + 0],
							h = t[n + 1],
							l = t[n + 2],
							u = t[n + 3],
							d = t[n + 4],
							f = t[n + 5],
							p = t[n + 6],
							m = t[n + 7],
							g = t[n + 8],
							v = t[n + 9],
							y = t[n + 10],
							b = t[n + 11],
							x = t[n + 12],
							_ = t[n + 13],
							w = t[n + 14],
							M = t[n + 15],
							T = o[0],
							S = o[1],
							E = o[2],
							C = o[3],
							S = a(S = a(S = a(S = a(S = r(S = r(S = r(S = r(S = i(S = i(S = i(S = i(S = e(S = e(S = e(S = e(S, E = e(E, C = e(C, T = e(T, S, E, C, s, 7, c[0]), S, E, h, 12, c[1]), T, S, l, 17, c[2]), C, T, u, 22, c[3]), E = e(E, C = e(C, T = e(T, S, E, C, d, 7, c[4]), S, E, f, 12, c[5]), T, S, p, 17, c[6]), C, T, m, 22, c[7]), E = e(E, C = e(C, T = e(T, S, E, C, g, 7, c[8]), S, E, v, 12, c[9]), T, S, y, 17, c[10]), C, T, b, 22, c[11]), E = e(E, C = e(C, T = e(T, S, E, C, x, 7, c[12]), S, E, _, 12, c[13]), T, S, w, 17, c[14]), C, T, M, 22, c[15]), E = i(E, C = i(C, T = i(T, S, E, C, h, 5, c[16]), S, E, p, 9, c[17]), T, S, b, 14, c[18]), C, T, s, 20, c[19]), E = i(E, C = i(C, T = i(T, S, E, C, f, 5, c[20]), S, E, y, 9, c[21]), T, S, M, 14, c[22]), C, T, d, 20, c[23]), E = i(E, C = i(C, T = i(T, S, E, C, v, 5, c[24]), S, E, w, 9, c[25]), T, S, u, 14, c[26]), C, T, g, 20, c[27]), E = i(E, C = i(C, T = i(T, S, E, C, _, 5, c[28]), S, E, l, 9, c[29]), T, S, m, 14, c[30]), C, T, x, 20, c[31]), E = r(E, C = r(C, T = r(T, S, E, C, f, 4, c[32]), S, E, g, 11, c[33]), T, S, b, 16, c[34]), C, T, w, 23, c[35]), E = r(E, C = r(C, T = r(T, S, E, C, h, 4, c[36]), S, E, d, 11, c[37]), T, S, m, 16, c[38]), C, T, y, 23, c[39]), E = r(E, C = r(C, T = r(T, S, E, C, _, 4, c[40]), S, E, s, 11, c[41]), T, S, u, 16, c[42]), C, T, p, 23, c[43]), E = r(E, C = r(C, T = r(T, S, E, C, v, 4, c[44]), S, E, x, 11, c[45]), T, S, M, 16, c[46]), C, T, l, 23, c[47]), E = a(E, C = a(C, T = a(T, S, E, C, s, 6, c[48]), S, E, m, 10, c[49]), T, S, w, 15, c[50]), C, T, f, 21, c[51]), E = a(E, C = a(C, T = a(T, S, E, C, x, 6, c[52]), S, E, u, 10, c[53]), T, S, y, 15, c[54]), C, T, h, 21, c[55]), E = a(E, C = a(C, T = a(T, S, E, C, g, 6, c[56]), S, E, M, 10, c[57]), T, S, p, 15, c[58]), C, T, _, 21, c[59]), E = a(E, C = a(C, T = a(T, S, E, C, d, 6, c[60]), S, E, b, 10, c[61]), T, S, l, 15, c[62]), C, T, v, 21, c[63]);
						o[0] = o[0] + T | 0, o[1] = o[1] + S | 0, o[2] = o[2] + E | 0, o[3] = o[3] + C | 0
					},
					_doFinalize: function () {
						var e = this._data,
							i = e.words,
							n = 8 * this._nDataBytes,
							r = 8 * e.sigBytes;
						i[r >>> 5] |= 128 << 24 - r % 32;
						var a = t.floor(n / 4294967296);
						for (i[15 + (r + 64 >>> 9 << 4)] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), i[14 + (r + 64 >>> 9 << 4)] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8), e.sigBytes = 4 * (i.length + 1), this._process(), i = (e = this._hash).words, n = 0; 4 > n; n++) r = i[n], i[n] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
						return e
					},
					clone: function () {
						var t = h.clone.call(this);
						return t._hash = this._hash.clone(), t
					}
				}), o.MD5 = h._createHelper(l), o.HmacMD5 = h._createHmacHelper(l)
			}(Math),
			function () {
				var t = n,
					e = t.lib,
					i = e.Base,
					r = e.WordArray,
					a = (e = t.algo).EvpKDF = i.extend({
						cfg: i.extend({
							keySize: 4,
							hasher: e.MD5,
							iterations: 1
						}),
						init: function (t) {
							this.cfg = this.cfg.extend(t)
						},
						compute: function (t, e) {
							for (var i = (s = this.cfg).hasher.create(), n = r.create(), a = n.words, o = s.keySize, s = s.iterations; a.length < o;) {
								h && i.update(h);
								var h = i.update(t).finalize(e);
								i.reset();
								for (var l = 1; l < s; l++) h = i.finalize(h), i.reset();
								n.concat(h)
							}
							return n.sigBytes = 4 * o, n
						}
					});
				t.EvpKDF = function (t, e, i) {
					return a.create(i).compute(t, e)
				}
			}(), n.lib.Cipher || function (t) {
					var e = (p = n).lib,
						i = e.Base,
						r = e.WordArray,
						a = e.BufferedBlockAlgorithm,
						o = p.enc.Base64,
						s = p.algo.EvpKDF,
						h = e.Cipher = a.extend({
							cfg: i.extend(),
							createEncryptor: function (t, e) {
								return this.create(this._ENC_XFORM_MODE, t, e)
							},
							createDecryptor: function (t, e) {
								return this.create(this._DEC_XFORM_MODE, t, e)
							},
							init: function (t, e, i) {
								this.cfg = this.cfg.extend(i), this._xformMode = t, this._key = e, this.reset()
							},
							reset: function () {
								a.reset.call(this), this._doReset()
							},
							process: function (t) {
								return this._append(t), this._process()
							},
							finalize: function (t) {
								return t && this._append(t), this._doFinalize()
							},
							keySize: 4,
							ivSize: 4,
							_ENC_XFORM_MODE: 1,
							_DEC_XFORM_MODE: 2,
							_createHelper: function (t) {
								return {
									encrypt: function (e, i, n) {
										return ("string" == typeof i ? m : f).encrypt(t, e, i, n)
									},
									decrypt: function (e, i, n) {
										return ("string" == typeof i ? m : f).decrypt(t, e, i, n)
									}
								}
							}
						});
					e.StreamCipher = h.extend({
						_doFinalize: function () {
							return this._process(!0)
						},
						blockSize: 1
					});
					var l = p.mode = {},
						c = function (t, e, i) {
							var n = this._iv;
							n ? this._iv = void 0 : n = this._prevBlock;
							for (var r = 0; r < i; r++) t[e + r] ^= n[r]
						},
						u = (e.BlockCipherMode = i.extend({
							createEncryptor: function (t, e) {
								return this.Encryptor.create(t, e)
							},
							createDecryptor: function (t, e) {
								return this.Decryptor.create(t, e)
							},
							init: function (t, e) {
								this._cipher = t, this._iv = e
							}
						})).extend();
					u.Encryptor = u.extend({
						processBlock: function (t, e) {
							var i = this._cipher,
								n = i.blockSize;
							c.call(this, t, e, n), i.encryptBlock(t, e), this._prevBlock = t.slice(e, e + n)
						}
					}), u.Decryptor = u.extend({
						processBlock: function (t, e) {
							var i = this._cipher,
								n = i.blockSize,
								r = t.slice(e, e + n);
							i.decryptBlock(t, e), c.call(this, t, e, n), this._prevBlock = r
						}
					}), l = l.CBC = u, u = (p.pad = {}).Pkcs7 = {
						pad: function (t, e) {
							for (var i = 4 * e, n = (i = i - t.sigBytes % i) << 24 | i << 16 | i << 8 | i, a = [], o = 0; o < i; o += 4) a.push(n);
							i = r.create(a, i), t.concat(i)
						},
						unpad: function (t) {
							t.sigBytes -= 255 & t.words[t.sigBytes - 1 >>> 2]
						}
					}, e.BlockCipher = h.extend({
						cfg: h.cfg.extend({
							mode: l,
							padding: u
						}),
						reset: function () {
							h.reset.call(this);
							var t = (e = this.cfg).iv,
								e = e.mode;
							if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor;
							else i = e.createDecryptor, this._minBufferSize = 1;
							this._mode = i.call(e, this, t && t.words)
						},
						_doProcessBlock: function (t, e) {
							this._mode.processBlock(t, e)
						},
						_doFinalize: function () {
							var t = this.cfg.padding;
							if (this._xformMode == this._ENC_XFORM_MODE) {
								t.pad(this._data, this.blockSize);
								var e = this._process(!0)
							} else e = this._process(!0), t.unpad(e);
							return e
						},
						blockSize: 4
					});
					var d = e.CipherParams = i.extend({
							init: function (t) {
								this.mixIn(t)
							},
							toString: function (t) {
								return (t || this.formatter).stringify(this)
							}
						}),
						l = (p.format = {}).OpenSSL = {
							stringify: function (t) {
								var e = t.ciphertext;
								return ((t = t.salt) ? r.create([1398893684, 1701076831]).concat(t).concat(e) : e).toString(o)
							},
							parse: function (t) {
								var e = (t = o.parse(t)).words;
								if (1398893684 == e[0] && 1701076831 == e[1]) {
									var i = r.create(e.slice(2, 4));
									e.splice(0, 4), t.sigBytes -= 16
								}
								return d.create({
									ciphertext: t,
									salt: i
								})
							}
						},
						f = e.SerializableCipher = i.extend({
							cfg: i.extend({
								format: l
							}),
							encrypt: function (t, e, i, n) {
								n = this.cfg.extend(n);
								var r = t.createEncryptor(i, n);
								return e = r.finalize(e), r = r.cfg, d.create({
									ciphertext: e,
									key: i,
									iv: r.iv,
									algorithm: t,
									mode: r.mode,
									padding: r.padding,
									blockSize: t.blockSize,
									formatter: n.format
								})
							},
							decrypt: function (t, e, i, n) {
								return n = this.cfg.extend(n), e = this._parse(e, n.format), t.createDecryptor(i, n).finalize(e.ciphertext)
							},
							_parse: function (t, e) {
								return "string" == typeof t ? e.parse(t, this) : t
							}
						}),
						p = (p.kdf = {}).OpenSSL = {
							execute: function (t, e, i, n) {
								return n || (n = r.random(8)), t = s.create({
									keySize: e + i
								}).compute(t, n), i = r.create(t.words.slice(e), 4 * i), t.sigBytes = 4 * e, d.create({
									key: t,
									iv: i,
									salt: n
								})
							}
						},
						m = e.PasswordBasedCipher = f.extend({
							cfg: f.cfg.extend({
								kdf: p
							}),
							encrypt: function (t, e, i, n) {
								return n = this.cfg.extend(n), i = n.kdf.execute(i, t.keySize, t.ivSize), n.iv = i.iv, (t = f.encrypt.call(this, t, e, i.key, n)).mixIn(i), t
							},
							decrypt: function (t, e, i, n) {
								return n = this.cfg.extend(n), e = this._parse(e, n.format), i = n.kdf.execute(i, t.keySize, t.ivSize, e.salt), n.iv = i.iv, f.decrypt.call(this, t, e, i.key, n)
							}
						})
				}(),
				function () {
					for (var t = n, e = t.lib.BlockCipher, i = t.algo, r = [], a = [], o = [], s = [], h = [], l = [], c = [], u = [], d = [], f = [], p = [], m = 0; 256 > m; m++) p[m] = 128 > m ? m << 1 : m << 1 ^ 283;
					for (var g = 0, v = 0, m = 0; 256 > m; m++) {
						var y = (y = v ^ v << 1 ^ v << 2 ^ v << 3 ^ v << 4) >>> 8 ^ 255 & y ^ 99;
						r[g] = y, a[y] = g;
						var b = p[g],
							x = p[b],
							_ = p[x],
							w = 257 * p[y] ^ 16843008 * y;
						o[g] = w << 24 | w >>> 8, s[g] = w << 16 | w >>> 16, h[g] = w << 8 | w >>> 24, l[g] = w, w = 16843009 * _ ^ 65537 * x ^ 257 * b ^ 16843008 * g, c[y] = w << 24 | w >>> 8, u[y] = w << 16 | w >>> 16, d[y] = w << 8 | w >>> 24, f[y] = w, g ? (g = b ^ p[p[p[_ ^ b]]], v ^= p[p[v]]) : g = v = 1
					}
					var M = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],
						i = i.AES = e.extend({
							_doReset: function () {
								for (var t = (i = this._key).words, e = i.sigBytes / 4, i = 4 * ((this._nRounds = e + 6) + 1), n = this._keySchedule = [], a = 0; a < i; a++)
									if (a < e) n[a] = t[a];
									else {
										var o = n[a - 1];
										a % e ? 6 < e && 4 == a % e && (o = r[o >>> 24] << 24 | r[o >>> 16 & 255] << 16 | r[o >>> 8 & 255] << 8 | r[255 & o]) : (o = o << 8 | o >>> 24, o = r[o >>> 24] << 24 | r[o >>> 16 & 255] << 16 | r[o >>> 8 & 255] << 8 | r[255 & o], o ^= M[a / e | 0] << 24), n[a] = n[a - e] ^ o
									}
								for (t = this._invKeySchedule = [], e = 0; e < i; e++) a = i - e, o = e % 4 ? n[a] : n[a - 4], t[e] = 4 > e || 4 >= a ? o : c[r[o >>> 24]] ^ u[r[o >>> 16 & 255]] ^ d[r[o >>> 8 & 255]] ^ f[r[255 & o]]
							},
							encryptBlock: function (t, e) {
								this._doCryptBlock(t, e, this._keySchedule, o, s, h, l, r)
							},
							decryptBlock: function (t, e) {
								var i = t[e + 1];
								t[e + 1] = t[e + 3], t[e + 3] = i, this._doCryptBlock(t, e, this._invKeySchedule, c, u, d, f, a), i = t[e + 1], t[e + 1] = t[e + 3], t[e + 3] = i
							},
							_doCryptBlock: function (t, e, i, n, r, a, o, s) {
								for (var h = this._nRounds, l = t[e] ^ i[0], c = t[e + 1] ^ i[1], u = t[e + 2] ^ i[2], d = t[e + 3] ^ i[3], f = 4, p = 1; p < h; p++) var m = n[l >>> 24] ^ r[c >>> 16 & 255] ^ a[u >>> 8 & 255] ^ o[255 & d] ^ i[f++],
									g = n[c >>> 24] ^ r[u >>> 16 & 255] ^ a[d >>> 8 & 255] ^ o[255 & l] ^ i[f++],
									v = n[u >>> 24] ^ r[d >>> 16 & 255] ^ a[l >>> 8 & 255] ^ o[255 & c] ^ i[f++],
									d = n[d >>> 24] ^ r[l >>> 16 & 255] ^ a[c >>> 8 & 255] ^ o[255 & u] ^ i[f++],
									l = m,
									c = g,
									u = v;
								m = (s[l >>> 24] << 24 | s[c >>> 16 & 255] << 16 | s[u >>> 8 & 255] << 8 | s[255 & d]) ^ i[f++], g = (s[c >>> 24] << 24 | s[u >>> 16 & 255] << 16 | s[d >>> 8 & 255] << 8 | s[255 & l]) ^ i[f++], v = (s[u >>> 24] << 24 | s[d >>> 16 & 255] << 16 | s[l >>> 8 & 255] << 8 | s[255 & c]) ^ i[f++], d = (s[d >>> 24] << 24 | s[l >>> 16 & 255] << 16 | s[c >>> 8 & 255] << 8 | s[255 & u]) ^ i[f++], t[e] = m, t[e + 1] = g, t[e + 2] = v, t[e + 3] = d
							},
							keySize: 8
						});
					t.AES = e._createHelper(i)
				}(), e.default = n
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = {
				Linear: function (t, e, i, n) {
					return i * t / n + e
				},
				Quad: {
					easeIn: function (t, e, i, n) {
						return i * (t /= n) * t + e
					},
					easeOut: function (t, e, i, n) {
						return -i * (t /= n) * (t - 2) + e
					},
					easeInOut: function (t, e, i, n) {
						return (t /= n / 2) < 1 ? i / 2 * t * t + e : -i / 2 * (--t * (t - 2) - 1) + e
					}
				},
				Cubic: {
					easeIn: function (t, e, i, n) {
						return i * (t /= n) * t * t + e
					},
					easeOut: function (t, e, i, n) {
						return i * ((t = t / n - 1) * t * t + 1) + e
					},
					easeInOut: function (t, e, i, n) {
						return (t /= n / 2) < 1 ? i / 2 * t * t * t + e : i / 2 * ((t -= 2) * t * t + 2) + e
					}
				},
				Quart: {
					easeIn: function (t, e, i, n) {
						return i * (t /= n) * t * t * t + e
					},
					easeOut: function (t, e, i, n) {
						return -i * ((t = t / n - 1) * t * t * t - 1) + e
					},
					easeInOut: function (t, e, i, n) {
						return (t /= n / 2) < 1 ? i / 2 * t * t * t * t + e : -i / 2 * ((t -= 2) * t * t * t - 2) + e
					}
				},
				Quint: {
					easeIn: function (t, e, i, n) {
						return i * (t /= n) * t * t * t * t + e
					},
					easeOut: function (t, e, i, n) {
						return i * ((t = t / n - 1) * t * t * t * t + 1) + e
					},
					easeInOut: function (t, e, i, n) {
						return (t /= n / 2) < 1 ? i / 2 * t * t * t * t * t + e : i / 2 * ((t -= 2) * t * t * t * t + 2) + e
					}
				},
				Sine: {
					easeIn: function (t, e, i, n) {
						return -i * Math.cos(t / n * (Math.PI / 2)) + i + e
					},
					easeOut: function (t, e, i, n) {
						return i * Math.sin(t / n * (Math.PI / 2)) + e
					},
					easeInOut: function (t, e, i, n) {
						return -i / 2 * (Math.cos(Math.PI * t / n) - 1) + e
					}
				},
				Expo: {
					easeIn: function (t, e, i, n) {
						return 0 == t ? e : i * Math.pow(2, 10 * (t / n - 1)) + e
					},
					easeOut: function (t, e, i, n) {
						return t == n ? e + i : i * (1 - Math.pow(2, -10 * t / n)) + e
					},
					easeInOut: function (t, e, i, n) {
						return 0 == t ? e : t == n ? e + i : (t /= n / 2) < 1 ? i / 2 * Math.pow(2, 10 * (t - 1)) + e : i / 2 * (2 - Math.pow(2, -10 * --t)) + e
					}
				},
				Circ: {
					easeIn: function (t, e, i, n) {
						return -i * (Math.sqrt(1 - (t /= n) * t) - 1) + e
					},
					easeOut: function (t, e, i, n) {
						return i * Math.sqrt(1 - (t = t / n - 1) * t) + e
					},
					easeInOut: function (t, e, i, n) {
						return (t /= n / 2) < 1 ? -i / 2 * (Math.sqrt(1 - t * t) - 1) + e : i / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + e
					}
				},
				Elastic: {
					easeIn: function (t, e, i, n, r, a) {
						var o;
						return 0 == t ? e : 1 == (t /= n) ? e + i : (void 0 === a && (a = .3 * n), !r || r < Math.abs(i) ? (o = a / 4, r = i) : o = a / (2 * Math.PI) * Math.asin(i / r), -r * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * n - o) * (2 * Math.PI) / a) + e)
					},
					easeOut: function (t, e, i, n, r, a) {
						var o;
						return 0 == t ? e : 1 == (t /= n) ? e + i : (void 0 === a && (a = .3 * n), !r || r < Math.abs(i) ? (r = i, o = a / 4) : o = a / (2 * Math.PI) * Math.asin(i / r), r * Math.pow(2, -10 * t) * Math.sin((t * n - o) * (2 * Math.PI) / a) + i + e)
					},
					easeInOut: function (t, e, i, n, r, a) {
						var o;
						return 0 == t ? e : 2 == (t /= n / 2) ? e + i : (void 0 === a && (a = n * (.3 * 1.5)), !r || r < Math.abs(i) ? (r = i, o = a / 4) : o = a / (2 * Math.PI) * Math.asin(i / r), t < 1 ? r * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * n - o) * (2 * Math.PI) / a) * -.5 + e : r * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * n - o) * (2 * Math.PI) / a) * .5 + i + e)
					}
				},
				Back: {
					easeIn: function (t, e, i, n, r) {
						return void 0 === r && (r = 1.70158), i * (t /= n) * t * ((r + 1) * t - r) + e
					},
					easeOut: function (t, e, i, n, r) {
						return void 0 === r && (r = 1.70158), i * ((t = t / n - 1) * t * ((r + 1) * t + r) + 1) + e
					},
					easeInOut: function (t, e, i, n, r) {
						return void 0 === r && (r = 1.70158), (t /= n / 2) < 1 ? i / 2 * (t * t * ((1 + (r *= 1.525)) * t - r)) + e : i / 2 * ((t -= 2) * t * ((1 + (r *= 1.525)) * t + r) + 2) + e
					}
				},
				Bounce: {
					easeIn: function (t, e, i, r) {
						return i - n.Bounce.easeOut(r - t, 0, i, r) + e
					},
					easeOut: function (t, e, i, n) {
						return (t /= n) < 1 / 2.75 ? i * (7.5625 * t * t) + e : t < 2 / 2.75 ? i * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + e : t < 2.5 / 2.75 ? i * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + e : i * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + e
					},
					easeInOut: function (t, e, i, r) {
						return t < r / 2 ? .5 * n.Bounce.easeIn(2 * t, 0, i, r) + e : .5 * n.Bounce.easeOut(2 * t - r, 0, i, r) + .5 * i + e
					}
				}
			};
			e.default = n
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.UI = this.game.UI, this.viewer = this.game.viewer, this.name = "game"
					}
					return n(t, [{
						key: "show",
						value: function () {
							this.UI.showScore(), this.UI.scoreText.obj.position.y = 21, this.UI.scoreText.obj.position.x = -13, this.UI.scoreText.changeStyle({
								textAlign: "left"
							})
						}
					}, {
						key: "hide",
						value: function () {
							this.UI.hideScore()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.name = "battlePage"
					}
					return n(t, [{
						key: "show",
						value: function (t) {
							this.full2D.showPkPage(t)
						}
					}, {
						key: "hide",
						value: function () {
							this.full2D.hide2D()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.name = "groupRankList"
					}
					return n(t, [{
						key: "show",
						value: function (t, e) {
							this.full2D.showGroupRankList(t, e)
						}
					}, {
						key: "hide",
						value: function () {
							this.full2D.hide2D()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = function (t) {
					if (t && t.__esModule) return t;
					var e = {};
					if (null != t)
						for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
					return e.default = t, e
				}(i(0)),
				o = i(1),
				s = (n(i(4)), n(i(10)), window.devicePixelRatio > 2 ? 2 : window.devicePixelRatio),
				h = window.innerHeight < window.innerWidth ? window.innerHeight : window.innerWidth,
				l = window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth,
				c = l * s,
				u = h * s,
				d = o.FRUSTUMSIZE,
				f = u / c * d,
				p = ["bg"],
				m = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.texture = {}, this.material = {}, this.geometry = {}, this.obj = {}, this.canvas = {}, this.context = {}, this._touchInfo = {
							trackingID: -1,
							maxDy: 0,
							maxDx: 0
						}, this.cwidth = u, this.cheight = 50, this.options = Object.assign({}, {}, e), this._createPlane()
					}
					return r(t, [{
						key: "showLookers",
						value: function (t) {
							this.showState = !0, t = t || {}, this._drawLookers(t)
						}
					}, {
						key: "showLookersShare",
						value: function (t) {
							this.showState = !0, t = t || {}
						}
					}, {
						key: "hideLookers",
						value: function () {
							this.showState = !1;
							for (var t = 0; t < p.length; t++) this.obj[p[t]].visible = !1, this.options.camera.remove(this.obj[p[t]])
						}
					}, {
						key: "_drawLookers",
						value: function (t) {
							var e = this,
								i = this.context.bg;
							i.fillStyle = "pink", i.strokeStyle = "red", i.lineWidth = 2 * s, i.clearRect(0, 0, this._cx(414), this._cx(this.cheight));
							var n = this.cheight;
							if (t.avaImg) {
								for (var r = u - t.avatar.length * this._cx(32), a = this, o = function () {
										var i = h * e._cx(36) + r;
										e._drawImageCenter(t.avatar[h], i, n / 2, a._cx(25), a._cx(25), "bg", function () {
											a._drawImageCenter("res/ava_big1.png", i, n / 2, a._cx(29), a._cx(29), "bg")
										})
									}, h = 0; h < t.avatar.length; h++) o();
								i.fillStyle = "rgba(0,0,0,0.56)", i.font = this._cf(14), i.textAlign = "right", i.textBaseline = "middle", i.fillText("有" + t.num + "位好友正在围观", r - this._cx(20), this._cx(16))
							}
							t.icon && this._drawImageCenter("res/observShare.png", this._cx(35), n / 2, this._cx(14), this._cx(16), "bg"), t.wording && (i.fillStyle = "rgba(0,0,0,0.56)", i.font = this._cf(14), i.textAlign = "left", i.textBaseline = "middle", i.fillText("邀请围观", this._cx(55), this._cx(16))), this._updatePlane("bg")
						}
					}, {
						key: "_createPlane",
						value: function () {
							for (var t = 0; t < p.length; t++) this.canvas[p[t]] = document.createElement("canvas"), this.context[p[t]] = this.canvas[p[t]].getContext("2d"), this.canvas[p[t]].width = u, this.canvas[p[t]].height = this.cheight * s, this.texture[p[t]] = new a.Texture(this.canvas[p[t]]), this.material[p[t]] = new a.MeshBasicMaterial({
								map: this.texture[p[t]],
								transparent: !0
							}), this.geometry[p[t]] = new a.PlaneGeometry(f, this.cheight / l * d), this.obj[p[t]] = new a.Mesh(this.geometry[p[t]], this.material[p[t]]), this.material[p[t]].map.minFilter = a.LinearFilter, this.obj[p[t]].position.y = -(.5 - this.cheight / 2 / l) * d, this.obj[p[t]].position.x = 0, this.obj[p[t]].position.z = 9 - .001 * t
						}
					}, {
						key: "_updatePlane",
						value: function (t) {
							this.showState && (this.texture[t].needsUpdate = !0, this.obj[t].visible = !0, this.options.camera.add(this.obj[t]))
						}
					}, {
						key: "_drawImageCenter",
						value: function (t, e, i, n, r, a, o) {
							"/0" != t && "/96" != t && "/64" != t && t || (t = "res/ava.png");
							var s = new Image,
								h = this,
								l = this.context[a];
							s.onload = function () {
								l.drawImage(s, e - n / 2, i - r / 2, n, r), !!o && o(), h._updatePlane(a)
							}, s.onerror = function () {
								!!o && o()
							}, s.src = t
						}
					}, {
						key: "_cx",
						value: function (t) {
							return t * h / 414 * s
						}
					}, {
						key: "_cf",
						value: function (t) {
							return t * s * h / 414 + "px Helvetica"
						}
					}]), t
				}();
			e.default = m
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.UI = this.game.UI, this.name = "viewerGG"
					}
					return n(t, [{
						key: "show",
						value: function (t) {
							var e = this.model.observeInfo;
							this.full2D.showLookersPage({
								type: "gg",
								score: t,
								headimg: e.headimg,
								nickname: e.nickName
							}), this.UI.hideScore()
						}
					}, {
						key: "hide",
						value: function () {
							this.full2D.hide2D()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.UI = this.game.UI, this.name = "viewerOut"
					}
					return n(t, [{
						key: "show",
						value: function () {
							var t = this.model.observeInfo;
							this.full2D.showLookersPage({
								type: "out",
								headimg: t.headimg,
								nickname: t.nickName
							}), this.UI.hideScore()
						}
					}, {
						key: "hide",
						value: function () {
							this.full2D.hide2D()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.UI = this.game.UI, this.name = "viewerWaiting"
					}
					return n(t, [{
						key: "show",
						value: function () {
							var t = this.model.observeInfo;
							this.full2D.showLookersPage({
								type: "in",
								headimg: t.headimg,
								nickname: t.nickName
							}), this.UI.scoreText.obj.position.x = 0, this.UI.scoreText.obj.position.y = 11, this.UI.scoreText.changeStyle({
								textAlign: "center"
							}), this.UI.showScore()
						}
					}, {
						key: "hide",
						value: function () {
							this.full2D.hide2D(), this.UI.hideScore(), this.UI.scoreText.obj.position.y = 21, this.UI.scoreText.obj.position.x = -13, this.UI.scoreText.changeStyle({
								textAlign: "left"
							})
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.UI = this.game.UI, this.viewer = this.game.viewer, this.name = "game"
					}
					return n(t, [{
						key: "show",
						value: function () {
							this.UI.showScore(), this.UI.scoreText.obj.position.y = 21, this.UI.scoreText.obj.position.x = -13, this.UI.scoreText.changeStyle({
								textAlign: "left"
							}), this.viewer.open()
						}
					}, {
						key: "hide",
						value: function () {
							this.viewer.close(), this.UI.hideScore()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function (t) {
					return t && t.__esModule ? t : {
						default: t
					}
				}(i(4)),
				a = window.devicePixelRatio > 2 ? 2 : window.devicePixelRatio,
				o = (window.innerHeight < window.innerWidth ? window.innerHeight : window.innerWidth, window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth, wx.loadFont("res/num.ttf")),
				s = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.texture = {}, this.material = {}
					}
					return n(t, [{
						key: "getShareCard",
						value: function (t, e) {
							t = t || {};
							this.canvas || (this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d"), this.canvas.width = 693, this.canvas.height = 558);
							var i = this.context;
							if ("shareBattle" == t.type) {
								i.fillStyle = "white", i.fillRect(0, 0, 693, 558);
								n = this;
								this._drawImageCanvas1("res/changlle_share.png", 0, 0, 693, 558, "share", function () {
									i.fillStyle = "rgba(0,0,0,0.8)", i.font = "180px " + o, i.textBaseline = "middle", i.textAlign = "center", i.fillText(t.score || 0, 356.5, 334.8), !!e && e(n.canvas)
								})
							}
							if ("history" == t.type) {
								i.fillStyle = "white", i.fillRect(0, 0, 693, 558);
								n = this;
								this._drawImageCanvas1("res/high_score.png", 0, 0, 693, 558, "share", function () {
									i.fillStyle = "#00c777", i.font = "180px " + o, i.textBaseline = "middle", i.textAlign = "center", i.fillText(t.score || 0, 356.5, .68 * 558), !!e && e(n.canvas)
								})
							}
							if ("rank" == t.type) {
								i.fillStyle = "white", i.fillRect(0, 0, 693, 558);
								var n = this,
									a = r.default.getMyUserInfo();
								n._drawImageCanvas1(a.headimg, 305.5, 279, 102, 102, "share", function () {
									n._drawImageCanvas1("res/high_rank.png", 0, 0, 693, 558, "share", function () {
										i.fillStyle = "#00c777", i.font = "60px " + o, i.textBaseline = "middle", i.textAlign = "center", i.fillText(t.score || 5678, 356.5, .8 * 558), !!e && e(n.canvas)
									})
								})
							}
						}
					}, {
						key: "_smallReat",
						value: function () {
							for (var t = this.context, e = ["red", "blue", "green", "yellow", "skyblue"], i = 0; i < e.length; i++) {
								t.fillStyle = e[i];
								for (var n = 0; n < 5; n++) t.fillRect(553 * Math.random(), 691 * Math.random(), 15, 15)
							}
						}
					}, {
						key: "_drawImageCanvas",
						value: function (t, e, i, n, r, a, o) {
							var s = new Image,
								h = this;
							s.onload = function () {
								h.context.drawImage(s, e - n / 2, i - r / 2, n, r), !!o && o(h.canvas)
							}, s.onerror = function () {
								!!o && o(h.canvas)
							}, s.src = t
						}
					}, {
						key: "_drawImageCanvas1",
						value: function (t, e, i, n, r, a, o) {
							var s = new Image,
								h = this;
							s.onload = function () {
								h.context.drawImage(s, e, i, n, r), !!o && o(h.canvas)
							}, s.onerror = function () {
								!!o && o(h.canvas)
							}, s.src = t
						}
					}]), t
				}();
			e.default = s
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.name = "friendRankList"
					}
					return n(t, [{
						key: "show",
						value: function () {
							this.full2D.showFriendRankList({
								week_best_score: this.model.weekBestScore
							})
						}
					}, {
						key: "hide",
						value: function () {
							this.full2D.hide2D()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.name = "singleSettlementPgae"
					}
					return n(t, [{
						key: "show",
						value: function () {
							var t = this,
								e = this.model.currentScore,
								i = this.model.getHighestScore(),
								n = this.model.startTime,
								r = this.model.weekBestScore,
								a = this.game.historyTimes.getTimes();
							this.full2D || this.game.handleWxOnError({
								message: "can not find full 2D gameOverPage",
								stack: ""
							}), setTimeout(function () {
								t.full2D && t.full2D.showGameOverPage({
									score: e,
									highest_score: i,
									start_time: n,
									week_best_score: r,
									game_cnt: a
								})
							}, 0)
						}
					}, {
						key: "hide",
						value: function () {
							this.full2D.hide2D()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.UI = this.game.UI, this.viewer = this.game.viewer, this.name = "game"
					}
					return n(t, [{
						key: "show",
						value: function () {
							var t = this.model.is_from_wn,
								e = this.model.firstBlood;
							t || this.game.guider || (e ? this.viewer.lookers.showLookers({
								avaImg: !1,
								icon: !0,
								wording: !0
							}) : this.viewer.open()), this.UI.showScore(), this.UI.scoreText.obj.position.y = 21, this.UI.scoreText.obj.position.x = -13, this.UI.scoreText.changeStyle({
								textAlign: "left"
							})
						}
					}, {
						key: "hide",
						value: function () {
							this.viewer.close(), this.UI.hideScore()
						}
					}, {
						key: "hideLookersShare",
						value: function () {
							this.model.firstBlood && (this.model.setFirstBlood(!1), this.viewer.open())
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this.game = e, this.model = this.game.gameModel, this.full2D = this.game.full2D, this.name = "startPage"
					}
					return n(t, [{
						key: "show",
						value: function () {
							var t = this;
							this.full2D || this.game.handleWxOnError({
								message: "can not find full 2D",
								stack: ""
							}), setTimeout(function () {
								t.full2D && t.full2D.showStartPage()
							}, 0)
						}
					}, {
						key: "hide",
						value: function () {
							this.full2D.hide2D()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t)
					}
					return n(t, null, [{
						key: "frameReport",
						value: function (t, e) {
							var i = 0;
							switch (t) {
								case "iPhone5":
									i = 1;
									break;
								case "iPhone5s":
									i = 2;
									break;
								case "iPhone6":
									i = 3;
									break;
								case "iPhone6s":
									i = 4;
									break;
								case "iPhone6Plus":
									i = 5;
									break;
								case "iPhone6sPlus":
									i = 6;
									break;
								case "iPhone7":
									i = 7;
									break;
								case "iPhone7s":
									i = 8;
									break;
								case "iPhone7Plus":
									i = 9;
									break;
								case "iPhone7sPlus":
									i = 10;
									break;
								case "iPhone8":
									i = 11;
									break;
								case "iPhone8Plus":
									i = 12;
									break;
								case "iPhoneX":
									i = 13
							}(new Image).src = "https://mp.weixin.qq.com/mp/jsmonitor?idkey=58121_" + 3 * i + "_" + e + ";58121_" + (3 * i + 1) + "_1&t=" + Math.random()
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this._drag = e, this._dragLog = Math.log(e), this._x = 0, this._v = 0, this._startTime = 0
					}
					return n(t, [{
						key: "set",
						value: function (t, e) {
							this._x = t, this._v = e, this._startTime = (new Date).getTime()
						}
					}, {
						key: "x",
						value: function (t) {
							void 0 === t && (t = ((new Date).getTime() - this._startTime) / 1e3);
							var e;
							return e = t === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, t), this._dt = t, this._x + this._v * e / this._dragLog - this._v / this._dragLog
						}
					}, {
						key: "dx",
						value: function (t) {
							void 0 === t && (t = ((new Date).getTime() - this._startTime) / 1e3);
							var e;
							return e = t === this._dt && this._powDragDt ? this._powDragDt : this._powDragDt = Math.pow(this._drag, t), this._dt = t, this._v * e
						}
					}, {
						key: "done",
						value: function () {
							return Math.abs(this.dx()) < 3
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";

			function n(t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var r = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				a = n(i(56)),
				o = n(i(58)),
				s = function () {
					function t(e) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this._extent = e, this._friction = new a.default(.01), this._spring = new o.default(1, 90, 20), this._startTime = 0, this._springing = !1, this._springOffset = 0
					}
					return r(t, [{
						key: "set",
						value: function (t, e) {
							this._friction.set(t, e), t > 0 && e >= 0 ? (this._springOffset = 0, this._springing = !0, this._spring.snap(t), this._spring.setEnd(0)) : t < -this._extent && e <= 0 ? (this._springOffset = 0, this._springing = !0, this._spring.snap(t), this._spring.setEnd(-this._extent)) : this._springing = !1, this._startTime = (new Date).getTime()
						}
					}, {
						key: "x",
						value: function (t) {
							if (!this._startTime) return 0;
							if (t || (t = ((new Date).getTime() - this._startTime) / 1e3), this._springing) return this._spring.x() + this._springOffset;
							var e = this._friction.x(t),
								i = this.dx(t);
							return e < -this._extent && i <= 0 && (this._springing = !0, this._spring.setEnd(0, i), e < -this._extent ? this._springOffset = -this._extent : this._springOffset = 0, e = this._spring.x() + this._springOffset), e
						}
					}, {
						key: "dx",
						value: function (t) {
							var e = 0;
							return e = this._lastTime === t ? this._lastDx : this._springing ? this._spring.dx(t) : this._friction.dx(t), this._lastTime = t, this._lastDx = e, e
						}
					}, {
						key: "done",
						value: function () {
							return this._springing ? this._spring.done() : this._friction.done()
						}
					}]), t
				}();
			e.default = s
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			});
			var n = function () {
					function t(t, e) {
						for (var i = 0; i < e.length; i++) {
							var n = e[i];
							n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n)
						}
					}
					return function (e, i, n) {
						return i && t(e.prototype, i), n && t(e, n), e
					}
				}(),
				r = function () {
					function t(e, i, n) {
						! function (t, e) {
							if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
						}(this, t), this._m = e, this._k = i, this._c = n, this._solution = null, this._endPosition = 0, this._startTime = 0
					}
					return n(t, [{
						key: "_solve",
						value: function (t, e) {
							var i = this._c,
								n = this._m,
								r = this._k,
								a = i * i - 4 * n * r;
							if (0 == a) {
								var o = t,
									s = e / ((u = -i / (2 * n)) * t);
								return {
									x: function (t) {
										return (o + s * t) * Math.pow(Math.E, u * t)
									},
									dx: function (t) {
										var e = Math.pow(Math.E, u * t);
										return u * (o + s * t) * e + s * e
									}
								}
							}
							if (a > 0) {
								var h = (-i - Math.sqrt(a)) / (2 * n),
									l = (-i + Math.sqrt(a)) / (2 * n),
									o = t - (s = (e - h * t) / (l - h));
								return {
									x: function (t) {
										var e, i;
										return t === this._t && (e = this._powER1T, i = this._powER2T), this._t = t, e || (e = this._powER1T = Math.pow(Math.E, h * t)), i || (i = this._powER2T = Math.pow(Math.E, l * t)), o * e + s * i
									},
									dx: function (t) {
										var e, i;
										return t === this._t && (e = this._powER1T, i = this._powER2T), this._t = t, e || (e = this._powER1T = Math.pow(Math.E, h * t)), i || (i = this._powER2T = Math.pow(Math.E, l * t)), o * h * e + s * l * i
									}
								}
							}
							var c = Math.sqrt(4 * n * r - i * i) / (2 * n),
								u = -i / 2 * n,
								o = t,
								s = (e - u * t) / c;
							return {
								x: function (t) {
									return Math.pow(Math.E, u * t) * (o * Math.cos(c * t) + s * Math.sin(c * t))
								},
								dx: function (t) {
									var e = Math.pow(Math.E, u * t),
										i = Math.cos(c * t),
										n = Math.sin(c * t);
									return e * (s * c * i - o * c * n) + u * e * (s * n + o * i)
								}
							}
						}
					}, {
						key: "x",
						value: function (t) {
							return void 0 == t && (t = ((new Date).getTime() - this._startTime) / 1e3), this._solution ? this._endPosition + this._solution.x(t) : 0
						}
					}, {
						key: "dx",
						value: function (t) {
							return void 0 == t && (t = ((new Date).getTime() - this._startTime) / 1e3), this._solution ? this._solution.dx(t) : 0
						}
					}, {
						key: "setEnd",
						value: function (t, e, i) {
							if (i || (i = (new Date).getTime()), t != this._endPosition || !this.almostZero(e, .4)) {
								e = e || 0;
								var n = this._endPosition;
								this._solution && (this.almostZero(e, .4) && (e = this._solution.dx((i - this._startTime) / 1e3)), n = this._solution.x((i - this._startTime) / 1e3), this.almostZero(e, .4) && (e = 0), this.almostZero(n, .4) && (n = 0), n += this._endPosition), this._solution && this.almostZero(n - t, .4) && this.almostZero(e, .4) || (this._endPosition = t, this._solution = this._solve(n - this._endPosition, e), this._startTime = i)
							}
						}
					}, {
						key: "snap",
						value: function (t) {
							this._startTime = (new Date).getTime(), this._endPosition = t, this._solution = {
								x: function () {
									return 0
								},
								dx: function () {
									return 0
								}
							}
						}
					}, {
						key: "done",
						value: function (t) {
							return t || (t = (new Date).getTime()), this.almostEqual(this.x(), this._endPosition, .4) && this.almostZero(this.dx(), .4)
						}
					}, {
						key: "almostEqual",
						value: function (t, e, i) {
							return t > e - i && t < e + i
						}
					}, {
						key: "almostZero",
						value: function (t, e) {
							return this.almostEqual(t, 0, e)
						}
					}]), t
				}();
			e.default = r
		}, function (t, e, i) {
			"use strict";
			Object.defineProperty(e, "__esModule", {
				value: !0
			}), e.encrypt = function (t, e) {
				var e = e.slice(0, 16),
					i = n.default.enc.Utf8.parse(e),
					r = n.default.enc.Utf8.parse(e),
					a = t;
				a = JSON.stringify(a);
				var o = n.default.AES.encrypt(a, i, {
					iv: r,
					mode: n.default.mode.CBC,
					padding: n.default.pad.Pkcs7
				});
				return o = o.toString()
			};
			var n = function (t) {
				return t && t.__esModule ? t : {
					default: t
				}
			}(i(40))
		}]);
	});
	require("game.js");